The fontlib
command¶
The fontlib library comes with a command line. Use fontlib --help
for a
basic help. Most commands do work with a workspace. If you haven’t used
fontlib before it might be good to create one first:
fontlib workspace init
Which creates a workspace and init this workspace with some defaults registered.
common options:
-c / --config
: git://fontlib/config.ini (see Config)-w / --workspace
: place where application persists its data
fontstack options:
--builtins
: select Builtin fonts--ep-fonts
: Fonts from entry points--google
: Google Fonts
For a more detailed help to one of the sub commands type:
$ fontlib <command> --help
fontlib –help
usage: fontlib [-h] [--debug] [--verbose] [--quiet] [-c [INI-FILE]]
[-w WORKSPACE] [--debug-sql]
{README,SCHEMA,version,list,css-parse,download,config,workspace,google}
...
The fontlib_ library comes with a command line. Use ``fontlib --help`` for a
basic help. Most commands do work with a workspace. If you haven't used
fontlib before it might be good to create one first::
fontlib workspace init
Which creates a workspace and init this workspace with some defaults registered.
.. _fontlib_cli_options:
common options:
- ``-c / --config``: :origin:`fontlib/config.ini` (see :ref:`config`)
- ``-w / --workspace``: place where application persists its data
fontstack options:
- ``--builtins``: select :ref:`builtin_fonts`
- ``--ep-fonts``: :ref:`ep_points`
- ``--google``: :ref:`googlefont`
For a more detailed help to one of the sub commands type::
$ fontlib <command> --help
optional arguments:
-h, --help show this help message and exit
--debug run in debug mode (default: False)
--verbose run in verbose mode (default: False)
--quiet run in quiet mode (default: False)
-c [INI-FILE], --config [INI-FILE]
specify config file (default:
/home/markus/.fontlib/config.ini)
-w WORKSPACE, --workspace WORKSPACE
workspace (default: ~/.fontlib)
--debug-sql debug sql engine (default: False)
commands:
{README,SCHEMA,version,list,css-parse,download,config,workspace,google}
README prints README to stdout
SCHEMA Turn SQLAlchemy DB Model into a graph.
version prints version infos to stdout
list list fonts registered in the workspace
css-parse Parse ``@font-face`` rules from <url>.
download Download font-family <family> into folder <dest>.
config Inspect configuration (working with INI files).
workspace Inspect and init workspace.
google tools for Google fonts
fontlib list
¶
fontlib list –help
usage: fontlib list [-h]
optional arguments:
-h, --help show this help message and exit
list fonts registered in the workspace
fontlib css-parse
¶
With this command fonts can be parsed from @font-face rules in a CSS file.
With the option --register
the parsed fonts will be registered in the
workspace.
fontlib css-parse –help
usage: fontlib css-parse [-h] [--register] url
positional arguments:
url URL of stylesheet (CSS) to parse
optional arguments:
-h, --help show this help message and exit
--register register parsed fonts (default: False)
Parse ``@font-face`` rules from <url>.
Load CSS (stylesheet) from <url> and filter ``@font-face`` rules. E.g. google
fonts API::
css-parse 'https://fonts.googleapis.com/css?family=Cute+Font|Roboto+Slab'
or built-in *dejavu* fonts from url::
css-parse 'file:/800GBPCIex4/share/fontlib/fontlib/files/cantarell/cantarell.css'
css-parse 'file:/800GBPCIex4/share/fontlib/fontlib/files/dejavu/dejavu.css'
fontlib download
¶
fontlib download –help
usage: fontlib download [-h] dest family [family ...]
positional arguments:
dest Folder where the download will be placed.
family Font's name, the value of CSS font-family property.E.g. 'Roboto
Slab' or 'DejaVu Sans Mono'
optional arguments:
-h, --help show this help message and exit
Download font-family <family> into folder <dest>.
fontlib config
¶
For more details see Config.
Source Code Remarks¶
Implementation of application’s configuration class Config
.