ftcli utils

Miscellaneous utilities.

ftcli utils [OPTIONS] COMMAND [ARGS]...

subcommands

add-dsig

Adds a dummy DSIG table to the fonts, unless the table is already present, or the font flavor is woff2.

ftcli utils add-dsig [OPTIONS] INPUT_PATH

Options

-r, --recursive

If input_path is a directory, recursively find font files both in input directory and its subdirectories.

-out, --output-dir <output_dir>

Specify the directory where output files are to be saved. If the directory doesn’t exist, will be created. If output_dir is not specified, files will be saved to the same folder.

--recalc-timestamp

Keep the original font ‘modified’ timestamp (head.modified) or set it to current time. By default, original timestamp is kept.

--no-overwrite

Overwrite existing files or save them to a new file (numbers are appended at the end of file name). By default, files are overwritten.

Arguments

INPUT_PATH

Required argument

del-table

Deletes the specified tables from the fonts.

ftcli utils del-table [OPTIONS] INPUT_PATH

Options

-t <table_tags>

Required TableTag of the table(s) to delete. Can be repeated to delete multiple tables at once.

-r, --recursive

If input_path is a directory, recursively find font files both in input directory and its subdirectories.

-out, --output-dir <output_dir>

Specify the directory where output files are to be saved. If the directory doesn’t exist, will be created. If output_dir is not specified, files will be saved to the same folder.

--recalc-timestamp

Keep the original font ‘modified’ timestamp (head.modified) or set it to current time. By default, original timestamp is kept.

--no-overwrite

Overwrite existing files or save them to a new file (numbers are appended at the end of file name). By default, files are overwritten.

Arguments

INPUT_PATH

Required argument

font-organizer

Sorts fonts in folders by family name and optionally by foundry, font revision and extension.

ftcli utils font-organizer [OPTIONS] INPUT_PATH

Options

-f, --foundry

Organize fonts by foundry.

Foundry directory will be created at top level, with Family Name directory as child.

Foundry name is obtained trying to read nameID 8 (Manufacturer Name), using as fallback nameID 9 (Designer). If nor nameID 8 nor nameID 9 are present in the ‘name’ table, the string is retrieved from achVendID in the ‘OS/2’ table.

-e, --extension

Moves fonts into a folder named after their real extension.

-v, --version

Appends the version string to the family folder.

Arguments

INPUT_PATH

Required argument

font-renamer

Rename font files according to the provided source string.

ftcli utils font-renamer [OPTIONS] INPUT_PATH

Options

-s, --source <source>

The source string(s) from which to extract the new file name. Default is 1 (FamilyName-StyleName), used also as fallback name when 4 or 5 are passed but the font is TrueType

1: FamilyName-StyleName
2: PostScript Name
3: Full Font Name
4: CFF TopDict fontNames (CFF fonts only)
5: CFF TopDict FullName (CFF fonts only)
Options:

1 | 2 | 3 | 4 | 5

-r, --recursive

If input_path is a directory, recursively find font files both in input directory and its subdirectories.

Arguments

INPUT_PATH

Required argument

rebuild

Rebuilds fonts by converting to XML and then converting back to the original format

ftcli utils rebuild [OPTIONS] INPUT_PATH

Options

-r, --recursive

If input_path is a directory, recursively find font files both in input directory and its subdirectories.

-out, --output-dir <output_dir>

Specify the directory where output files are to be saved. If the directory doesn’t exist, will be created. If output_dir is not specified, files will be saved to the same folder.

--recalc-timestamp

Keep the original font ‘modified’ timestamp (head.modified) or set it to current time. By default, original timestamp is kept.

--no-overwrite

Overwrite existing files or save them to a new file (numbers are appended at the end of file name). By default, files are overwritten.

Arguments

INPUT_PATH

Required argument

set-revision

Sets [head].fontRevision and CFF.cff.topDictIndex[0].version values.

Optionally, also nameID 3 (Unique identifier) and nameID 5 (Version string) can be recalculated by using –unique-identifier and –version-string options. Even if Unique identifier and Version string should be changed according to the new version, they are optional to leave control to the user, who could choose to set those names manually with ftcli name set-name or ftcli name find-replace commands.

ftcli utils set-revision [OPTIONS] INPUT_PATH

Options

-major <major>

Major version

-minor <minor>

Minor version

-ui, --unique-identifier

Recalculates nameID 3 (Unique identifier)

-vs, --version-string

Recalculates nameID 5 (version string)

-p, --platform-id <platform_id>

platformID of the NameRecord to add (1: Macintosh, 3: Windows).

When recalculating Unique identifier and/or Version string, update only the NameRecords matching the specified platformID.

Options:

1 | 3

-r, --recursive

If input_path is a directory, recursively find font files both in input directory and its subdirectories.

-out, --output-dir <output_dir>

Specify the directory where output files are to be saved. If the directory doesn’t exist, will be created. If output_dir is not specified, files will be saved to the same folder.

--recalc-timestamp

Keep the original font ‘modified’ timestamp (head.modified) or set it to current time. By default, original timestamp is kept.

--no-overwrite

Overwrite existing files or save them to a new file (numbers are appended at the end of file name). By default, files are overwritten.

Arguments

INPUT_PATH

Required argument