ftcli ttf

A set of tools to manipulate fonts with TrueType outlines.

ftcli ttf [OPTIONS] COMMAND [ARGS]...

subcommands

autohint

Autohint TrueType fonts using ttfautohint-py.

ftcli ttf autohint [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

decompose

Decompose composite glyphs of a TrueType font.

ftcli ttf decompose [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

dehint

Drops hinting from TrueType fonts.

This is a CLI for dehinter by Source Foundry: https://github.com/source-foundry/dehinter

ftcli ttf dehint [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

fix-contours

Fix winding and remove overlaps and tiny paths from contours.

ftcli ttf fix-contours [OPTIONS] INPUT_PATH

Options

--min-area <min_area>

Minimum area for a tiny outline.

Default is 25 square units. Subpaths with a bounding box less than this will be reported and deleted.

--keep-hinting

Do not remove hinting.

--silent

Run in silent mode

-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

remove-overlaps

Simplify glyphs in TrueType fonts by merging overlapping contours.

ftcli ttf remove-overlaps [OPTIONS] INPUT_PATH

Options

--keep-hinting

Keep hinting for unmodified glyphs

--ignore-errors

Ignore errors while removing overlaps.

-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

rename-glyph

Renames a glyph.

ftcli ttf rename-glyph [OPTIONS] INPUT_PATH

Options

-old <old_glyph_name>

Required Old glyph name

-new <new_glyph_name>

Required New glyph name

-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

scale-upm

Change the units-per-EM of TrueType fonts.

Hinting is removed from scaled TrueType fonts to avoid bad results. You may consider to use ‘ftcli utils ttf-autohint’ to hint the scaled fonts.

ftcli ttf scale-upm [OPTIONS] INPUT_PATH

Options

-upm <upm>

Required New UPM value.

According to the OpenType spec, unitsPerEm attribute in the head table must be a value between 16 and 16384.

-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