ftcli cff

Utilities for editing the CFF table.

Usage

ftcli cff [OPTIONS] COMMAND [ARGS]...

del-names

Deletes attributes from topDictIndex[0] using the provided keyword arguments.

Usage

ftcli cff del-names [OPTIONS] INPUT_PATH

Options

Deletes the Copyright value

--family-name

Deletes the FamilyName value

--full-name

Deletes the FullName value

--notice

Deletes the Notice value

--version

Deletes the version value

--weight

Deletes the Weight value

--unique-id

Deletes the UniqueID value

-r, --recursive

Recursively find font files both in input directory and its subdirectories.

Only applicable if INPUT_PATH is a directory.

-out, --output-dir <output_dir>

The directory where output files are to be saved.

If not specified, files will be saved to the same folder.

If the output directory doesn’t exist, it will be created, as well as any missing parent directories.

-ow, --overwrite, -no-ow, --no-overwrite

Do not overwrite existing files on save.

If a file with the same name as the output file already exists, the command will suffix the filename with a number (#1, #2, etc.).

By default, existing files are overwritten.

-rbb, --recalc-bboxes, -no-rbb, --no-recalc-bboxes

Do not recalculate the font’s bounding boxes on save.

By default, glyf, CFF ``, ``head bounding box values and hhea/vhea min/max values are recalculated on save. Also, the glyphs are compiled on importing, which saves memory consumption and time.

-rtb, --reorder-tables

Reorder the font’s tables on save.

When this option is active, tables are sorted by tag on save (recommended by the OpenType specification).

-rts, --recalc-timestamp

Set the modified timestamp in the head table on save.

By default, the original modified timestamp is kept.

Arguments

INPUT_PATH

Required argument

find-replace

Finds and replaces a string in the CFF table. It performs the replacement in cff.fontNames[0] and in the following topDictIndex[0] fields:

* version
* FullName
* FamilyName
* Weight
* Copyright
* Notice

Usage

ftcli cff find-replace [OPTIONS] INPUT_PATH

Options

-os, --old-string <old_string>

Required The string to be replaced in th CFF TopDictIndex[0] fields.

-ns, --new-string <new_string>

Required The string to replace the old string with in the CFF TopDictIndex[0] fields.

-r, --recursive

Recursively find font files both in input directory and its subdirectories.

Only applicable if INPUT_PATH is a directory.

-out, --output-dir <output_dir>

The directory where output files are to be saved.

If not specified, files will be saved to the same folder.

If the output directory doesn’t exist, it will be created, as well as any missing parent directories.

-ow, --overwrite, -no-ow, --no-overwrite

Do not overwrite existing files on save.

If a file with the same name as the output file already exists, the command will suffix the filename with a number (#1, #2, etc.).

By default, existing files are overwritten.

-rbb, --recalc-bboxes, -no-rbb, --no-recalc-bboxes

Do not recalculate the font’s bounding boxes on save.

By default, glyf, CFF ``, ``head bounding box values and hhea/vhea min/max values are recalculated on save. Also, the glyphs are compiled on importing, which saves memory consumption and time.

-rtb, --reorder-tables

Reorder the font’s tables on save.

When this option is active, tables are sorted by tag on save (recommended by the OpenType specification).

-rts, --recalc-timestamp

Set the modified timestamp in the head table on save.

By default, the original modified timestamp is kept.

Arguments

INPUT_PATH

Required argument

set-names

Sets the cff.fontNames[0] and/or topDictIndex[0] values.

Usage

ftcli cff set-names [OPTIONS] INPUT_PATH

Options

--font-name <fontNames>

Sets the cff.fontNames value

Sets the cff.topDictIndex[0].Copyright value

--family-name <FamilyName>

Sets the cff.topDictIndex[0].FamilyName value

--full-name <FullName>

Sets the cff.topDictIndex[0].FullName value

--notice <Notice>

Sets the cff.topDictIndex[0].Notice value

--version <version>

Sets the cff.topDictIndex[0].version value

--weight <Weight>

Sets the cff.topDictIndex[0].Weight value

-r, --recursive

Recursively find font files both in input directory and its subdirectories.

Only applicable if INPUT_PATH is a directory.

-out, --output-dir <output_dir>

The directory where output files are to be saved.

If not specified, files will be saved to the same folder.

If the output directory doesn’t exist, it will be created, as well as any missing parent directories.

-ow, --overwrite, -no-ow, --no-overwrite

Do not overwrite existing files on save.

If a file with the same name as the output file already exists, the command will suffix the filename with a number (#1, #2, etc.).

By default, existing files are overwritten.

-rbb, --recalc-bboxes, -no-rbb, --no-recalc-bboxes

Do not recalculate the font’s bounding boxes on save.

By default, glyf, CFF ``, ``head bounding box values and hhea/vhea min/max values are recalculated on save. Also, the glyphs are compiled on importing, which saves memory consumption and time.

-rtb, --reorder-tables

Reorder the font’s tables on save.

When this option is active, tables are sorted by tag on save (recommended by the OpenType specification).

-rts, --recalc-timestamp

Set the modified timestamp in the head table on save.

By default, the original modified timestamp is kept.

Arguments

INPUT_PATH

Required argument