ftcli os2
Utilities for editing the OS/2 table.
Usage
ftcli os2 [OPTIONS] COMMAND [ARGS]...
fsselection
Sets flags in the fsSelection field of the OS/2 table.
Usage
ftcli os2 fsselection [OPTIONS] INPUT_PATH
Options
- -it, --italic, -no-it, --no-italic
Sets or clears the
OS/2.fsSelectionbit 0 (ITALIC).The bit 1 of the
macStylefield in theheadtable will be set to the same value as bit 0 in the fsSelection field of theOS/2table.
- -us, --underscore, -no-us, --no-underscore
Sets or clears the
OS/2.fsSelectionbit 1 (UNDERSCORE).Set to indicate that the font glyphs are underscored.
- -ng, --negative, -no-ng, --no-negative
Sets or clears the
OS/2.fsSelectionbit 2 (NEGATIVE).Set this bit when the font glyphs have their foreground and background reversed.
- -ol, --outline, -no-ol, --no-outline
Sets or clears the
OS/2.fsSelectionbit 3 (OUTLINE).Set this bit when the font has outline glyphs.
- -so, --strikeout, -no-so, --no-strikeout
Sets or clears the
OS/2.fsSelectionbit 4 (STRIKEOUT).Set this bit when the font has glyphs that are overstruck.
- -bd, --bold, -no-bd, --no-bold
Sets or clears the
OS/2.fsSelectionbit 5 (BOLD).The bit 0 of the
macStylefield in theheadtable will be set to the same value asfsSelectionbit 5.
- -rg, --regular
Sets the
OS/2.fsSelectionbit 6 (REGULAR).If bit 6 is set, then
OS/2.fsSelectionbits 0 and 5 will be cleared, as well as themacStylebits 0 and 1 in theheadtable.
- -utm, --use-typo-metrics, -no-utm, --no-use-typo-metrics
Sets or clears the
OS/2.fsSelectionbit 7 (USE_TYPO_METRICS).If set, it is strongly recommended that applications use
OS/2.sTypoAscender - OS/2.sTypoDescender + OS/2.sTypoLineGapas the default line spacing for this font.Bit 7 was defined in version 4 of the
OS/2table.
- -wws, --wws-consistent, -no-wws, --no-wws-consistent
Sets or clears the
OS/2.fsSelectionbit 8 (WWS_CONSISTENT).If bit 8 is set, then
nametable strings for family and subfamily are provided that are consistent with a weight/width/slope family model without requiring the use of name IDs 21 or 22.Bit 8 was defined in version 4 of the
OS/2table.
- -obl, --oblique, -no-obl, --no-oblique
Sets or clears the
OS/2.fsSelectionbit 9 (OBLIQUE).If bit 9 is set, then this font is to be considered an “oblique” style by processes which make a distinction between oblique and italic styles, such as Cascading Style Sheets font matching. For example, a font created by algorithmically slanting an upright face will set this bit.
This bit, unlike the ITALIC bit (bit 0), is not related to style-linking in applications that assume a four-member font-family model comprised of regular, italic, bold and bold italic. It may be set or unset independently of the ITALIC bit. In most cases, if OBLIQUE is set, then ITALIC will also be set, though this is not required.
Bit 9 was defined in version 4 of the
OS/2table.
- -r, --recursive
Recursively find font files both in input directory and its subdirectories.
Only applicable if
INPUT_PATHis 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.
- -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.
- -no-rbb, --no-recalc-bboxes
Do not recalculate the font’s bounding boxes on save.
By default,
glyf,CFF ``, ``headbounding box values andhhea/vheamin/max values are recalculated on save. Also, the glyphs are compiled on importing, which saves memory consumption and time.
- -no-rtb, --no-reorder-tables
Do not reorder the font’s tables on save.
By default, tables are sorted by tag on save (recommended by the OpenType specification).
- -rts, --recalc-timestamp
Set the
modifiedtimestamp in theheadtable on save.By default, the original
modifiedtimestamp is kept.
Arguments
- INPUT_PATH
Required argument
fstype
Set font embedding licensing rights for the font, defined in the fsType field of the OS/2 table.
Usage
ftcli os2 fstype [OPTIONS] INPUT_PATH
Options
- -el, --embed-level <embed_level>
Usage permissions. Valid fonts must set at most one of bits 1, 2 or 3; bit 0 is permanently reserved and must be zero. Valid values for this sub-field are 0, 2, 4 or 8. The meaning of these values is as follows:
0: Installable embedding: the font may be embedded, and may be permanently installed for use on a remote systems, or for use by other users. The user of the remote system acquires the identical rights, obligations and licenses for that font as the original purchaser of the font, and is subject to the same end-user license agreement, copyright, design patent, and/or trademark as was the original purchaser.
2: Restricted License embedding: the font must not be modified, embedded or exchanged in any manner without first obtaining explicit permission of the legal owner.
4: Preview & Print embedding: the font may be embedded, and may be temporarily loaded on other systems for purposes of viewing or printing the document. Documents containing Preview & Print fonts must be opened “read-only”; no edits can be applied to the document.
8: Editable embedding: the font may be embedded, and may be temporarily loaded on other systems. As with Preview & Print embedding, documents containing Editable fonts may be opened for reading. In addition, editing is permitted, including ability to format new text using the embedded font, and changes may be saved.
- Options:
0 | 2 | 4 | 8
- -ns, --no-subsetting, -no-ns, --subsetting
Sets or clears the
OS/2.fsTypebit 8 (NO_SUBSETTING).When this bit is set, the font may not be subsetted prior to embedding. Other embedding restrictions specified in bits 0 to 3 and bit 9 also apply.
- -beo, --bitmap-embed-only, -no-beo, --no-bitmap-embed-only
Sets or clears the
OS/2.fsTypebit 9 (BITMAP_EMBED_ONLY).When this bit is set, only bitmaps contained in the font may be embedded. No outline data may be embedded. If there are no bitmaps available in the font, then the font is considered unembeddable and the embedding services will fail. Other embedding restrictions specified in bits 0-3 and 8 also apply.
- -r, --recursive
Recursively find font files both in input directory and its subdirectories.
Only applicable if
INPUT_PATHis 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.
- -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.
- -no-rbb, --no-recalc-bboxes
Do not recalculate the font’s bounding boxes on save.
By default,
glyf,CFF ``, ``headbounding box values andhhea/vheamin/max values are recalculated on save. Also, the glyphs are compiled on importing, which saves memory consumption and time.
- -no-rtb, --no-reorder-tables
Do not reorder the font’s tables on save.
By default, tables are sorted by tag on save (recommended by the OpenType specification).
- -rts, --recalc-timestamp
Set the
modifiedtimestamp in theheadtable on save.By default, the original
modifiedtimestamp is kept.
Arguments
- INPUT_PATH
Required argument
panose
Sets the PANOSE classification in the OS/2 table.
Usage
ftcli os2 panose [OPTIONS] INPUT_PATH
Options
- -ft, --family-type <bFamilyType>
Sets the ‘bFamilyType’ value.
- -ss, --serif-style <bSerifStyle>
Sets the ‘bSerifStyle’ value.
- -wt, --weight <bWeight>
Sets the ‘bWeight’ value.
- -pr, --proportion <bProportion>
Sets the ‘bProportion’ value.
- -ct, --contrast <bContrast>
Sets the ‘bContrast’ value.
- -sv, --stroke-variation <bStrokeVariation>
Sets the ‘bStrokeVariation’ value.
- -as, --arm-style <bArmStyle>
Sets the ‘bArmStyle’ value.
- -lf, --letter-form <bLetterForm>
Sets the ‘bLetterForm’ value.
- -ml, --midline <bMidline>
Sets the ‘bMidline’ value.
- -xh, --x-height <bXHeight>
Sets the ‘bXHeight’ value.
- -r, --recursive
Recursively find font files both in input directory and its subdirectories.
Only applicable if
INPUT_PATHis 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.
- -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.
- -no-rbb, --no-recalc-bboxes
Do not recalculate the font’s bounding boxes on save.
By default,
glyf,CFF ``, ``headbounding box values andhhea/vheamin/max values are recalculated on save. Also, the glyphs are compiled on importing, which saves memory consumption and time.
- -no-rtb, --no-reorder-tables
Do not reorder the font’s tables on save.
By default, tables are sorted by tag on save (recommended by the OpenType specification).
- -rts, --recalc-timestamp
Set the
modifiedtimestamp in theheadtable on save.By default, the original
modifiedtimestamp is kept.
Arguments
- INPUT_PATH
Required argument
recalc-avg-width
Recalculates the xAvgCharWidth value of the OS/2 table.
Usage
ftcli os2 recalc-avg-width [OPTIONS] INPUT_PATH
Options
- -r, --recursive
Recursively find font files both in input directory and its subdirectories.
Only applicable if
INPUT_PATHis 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.
- -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.
- -no-rbb, --no-recalc-bboxes
Do not recalculate the font’s bounding boxes on save.
By default,
glyf,CFF ``, ``headbounding box values andhhea/vheamin/max values are recalculated on save. Also, the glyphs are compiled on importing, which saves memory consumption and time.
- -no-rtb, --no-reorder-tables
Do not reorder the font’s tables on save.
By default, tables are sorted by tag on save (recommended by the OpenType specification).
- -rts, --recalc-timestamp
Set the
modifiedtimestamp in theheadtable on save.By default, the original
modifiedtimestamp is kept.
Arguments
- INPUT_PATH
Required argument
recalc-cap-height
Recalculates the sCapHeight value of the OS/2 table.
Usage
ftcli os2 recalc-cap-height [OPTIONS] INPUT_PATH
Options
- -gn, --glyph-name <glyph_name>
The glyph name to use for calculating the cap height. Default is ‘H’.
- -r, --recursive
Recursively find font files both in input directory and its subdirectories.
Only applicable if
INPUT_PATHis 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.
- -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.
- -no-rbb, --no-recalc-bboxes
Do not recalculate the font’s bounding boxes on save.
By default,
glyf,CFF ``, ``headbounding box values andhhea/vheamin/max values are recalculated on save. Also, the glyphs are compiled on importing, which saves memory consumption and time.
- -no-rtb, --no-reorder-tables
Do not reorder the font’s tables on save.
By default, tables are sorted by tag on save (recommended by the OpenType specification).
- -rts, --recalc-timestamp
Set the
modifiedtimestamp in theheadtable on save.By default, the original
modifiedtimestamp is kept.
Arguments
- INPUT_PATH
Required argument
recalc-codepage-ranges
Recalculates the ulCodePageRange values of the OS/2 table.
Usage
ftcli os2 recalc-codepage-ranges [OPTIONS] INPUT_PATH
Options
- -r, --recursive
Recursively find font files both in input directory and its subdirectories.
Only applicable if
INPUT_PATHis 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.
- -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.
- -no-rbb, --no-recalc-bboxes
Do not recalculate the font’s bounding boxes on save.
By default,
glyf,CFF ``, ``headbounding box values andhhea/vheamin/max values are recalculated on save. Also, the glyphs are compiled on importing, which saves memory consumption and time.
- -no-rtb, --no-reorder-tables
Do not reorder the font’s tables on save.
By default, tables are sorted by tag on save (recommended by the OpenType specification).
- -rts, --recalc-timestamp
Set the
modifiedtimestamp in theheadtable on save.By default, the original
modifiedtimestamp is kept.
Arguments
- INPUT_PATH
Required argument
recalc-max-context
Recalculates the usMaxContext value of the OS/2 table.
Usage
ftcli os2 recalc-max-context [OPTIONS] INPUT_PATH
Options
- -r, --recursive
Recursively find font files both in input directory and its subdirectories.
Only applicable if
INPUT_PATHis 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.
- -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.
- -no-rbb, --no-recalc-bboxes
Do not recalculate the font’s bounding boxes on save.
By default,
glyf,CFF ``, ``headbounding box values andhhea/vheamin/max values are recalculated on save. Also, the glyphs are compiled on importing, which saves memory consumption and time.
- -no-rtb, --no-reorder-tables
Do not reorder the font’s tables on save.
By default, tables are sorted by tag on save (recommended by the OpenType specification).
- -rts, --recalc-timestamp
Set the
modifiedtimestamp in theheadtable on save.By default, the original
modifiedtimestamp is kept.
Arguments
- INPUT_PATH
Required argument
recalc-unicode-ranges
Recalculates the ulUnicodeRange values of the OS/2 table based on a minimum percentage of coverage.
Usage
ftcli os2 recalc-unicode-ranges [OPTIONS] INPUT_PATH
Options
- -p, --percentage <percentage>
Minimum percentage of coverage required for a Unicode range to be enabled.
- -r, --recursive
Recursively find font files both in input directory and its subdirectories.
Only applicable if
INPUT_PATHis 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.
- -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.
- -no-rbb, --no-recalc-bboxes
Do not recalculate the font’s bounding boxes on save.
By default,
glyf,CFF ``, ``headbounding box values andhhea/vheamin/max values are recalculated on save. Also, the glyphs are compiled on importing, which saves memory consumption and time.
- -no-rtb, --no-reorder-tables
Do not reorder the font’s tables on save.
By default, tables are sorted by tag on save (recommended by the OpenType specification).
- -rts, --recalc-timestamp
Set the
modifiedtimestamp in theheadtable on save.By default, the original
modifiedtimestamp is kept.
Arguments
- INPUT_PATH
Required argument
recalc-x-height
Recalculates the sxHeight value of the OS/2 table.
Usage
ftcli os2 recalc-x-height [OPTIONS] INPUT_PATH
Options
- -gn, --glyph-name <glyph_name>
The glyph name to use for calculating the x-height. Default is ‘x’.
- -r, --recursive
Recursively find font files both in input directory and its subdirectories.
Only applicable if
INPUT_PATHis 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.
- -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.
- -no-rbb, --no-recalc-bboxes
Do not recalculate the font’s bounding boxes on save.
By default,
glyf,CFF ``, ``headbounding box values andhhea/vheamin/max values are recalculated on save. Also, the glyphs are compiled on importing, which saves memory consumption and time.
- -no-rtb, --no-reorder-tables
Do not reorder the font’s tables on save.
By default, tables are sorted by tag on save (recommended by the OpenType specification).
- -rts, --recalc-timestamp
Set the
modifiedtimestamp in theheadtable on save.By default, the original
modifiedtimestamp is kept.
Arguments
- INPUT_PATH
Required argument
set-attrs
Sets miscellaneous attributes of the ‘OS/2’ table.
Usage
ftcli os2 set-attrs [OPTIONS] INPUT_PATH
Options
- -wght, --weight-class <weight_class>
The new
usWeightClassvalue.Indicates the visual weight (degree of blackness or thickness of strokes) of the characters in the font. Values from 1 to 1000 are valid.
- -wdth, --width-class <width_class>
The new
usWidthClassvalue.Indicates a relative change from the normal aspect ratio (width to height ratio) as specified by a font designer for the glyphs in a font.
- -vid, --vendor-id <vendor_id>
The new
achVendIDvalue.The four-character identifier for the vendor of the given type face.
- -tasc, --typo-ascender <typo_ascender>
The new
sTypoAscendervalue.The typographic ascender of the font. This field should be combined with the
sTypoDescenderandsTypoLineGapvalues to determine default line spacing.
- -tdsc, --typo-descender <typo_descender>
The new
sTypoDescendervalue.The typographic descender of the font. This field should be combined with the
sTypoAscenderandsTypoLineGapvalues to determine default line spacing.
- -tlg, --typo-line-gap <typo_line_gap>
The new
sTypoLineGapvalue.The typographic line gap of the font. This field should be combined with the
sTypoAscenderandsTypoDescendervalues to determine default line spacing.
- -wasc, --win-ascent <win_ascent>
The new
usWinAscentvalue.This field represents the “Windows ascender” metric. This should be used to specify the height above the baseline for a clipping region.
- -wdsc, --win-descent <win_descent>
The new
usWinDescentvalue.This field represents the “Windows descender” metric. This should be used to specify the depth below the baseline for a clipping region.
- -xhgt, --x-height <x_height>
The new
sxHeightvalue.This metric specifies the distance between the baseline and the approximate height of non-ascending lowercase letters measured in FUnits. This value would normally be specified by a type designer but in situations where that is not possible, for example when a legacy font is being converted, the value may be set equal to the top of the unscaled and unhinted glyph bounding box of the glyph encoded at U+0078 (LATIN SMALL LETTER X). If no glyph is encoded in this position the field should be set to 0.
This metric, if specified, can be used in font substitution: the xHeight value of one font can be scaled to approximate the apparent size of another.
This field was defined in version 2 of the
OS/2table.
- -chgt, --cap-height <cap_height>
The new
sCapHeightvalue.This metric specifies the distance between the baseline and the approximate height of uppercase letters measured in FUnits. This value would normally be specified by a type designer but in situations where that is not possible, for example when a legacy font is being converted, the value may be set equal to the top of the unscaled and unhinted glyph bounding box of the glyph encoded at U+0048 (LATIN CAPITAL LETTER H). If no glyph is encoded in this position the field should be set to 0.
This metric, if specified, can be used in systems that specify type size by capital height measured in millimeters. It can also be used as an alignment metric; the top of a drop capital, for instance, can be aligned to the sCapHeight metric of the first line of text.
This field was defined in version 2 of the
OS/2table.
- -r, --recursive
Recursively find font files both in input directory and its subdirectories.
Only applicable if
INPUT_PATHis 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.
- -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.
- -no-rbb, --no-recalc-bboxes
Do not recalculate the font’s bounding boxes on save.
By default,
glyf,CFF ``, ``headbounding box values andhhea/vheamin/max values are recalculated on save. Also, the glyphs are compiled on importing, which saves memory consumption and time.
- -no-rtb, --no-reorder-tables
Do not reorder the font’s tables on save.
By default, tables are sorted by tag on save (recommended by the OpenType specification).
- -rts, --recalc-timestamp
Set the
modifiedtimestamp in theheadtable on save.By default, the original
modifiedtimestamp is kept.
Arguments
- INPUT_PATH
Required argument
upgrade
Upgrades the OS/2 table version.
If the target version is less or equal to the current version, the table is not modified.
Usage
ftcli os2 upgrade [OPTIONS] INPUT_PATH
Options
- -v, --target-version <target_version>
The version of the OS/2 table to set.
- -r, --recursive
Recursively find font files both in input directory and its subdirectories.
Only applicable if
INPUT_PATHis 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.
- -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.
- -no-rbb, --no-recalc-bboxes
Do not recalculate the font’s bounding boxes on save.
By default,
glyf,CFF ``, ``headbounding box values andhhea/vheamin/max values are recalculated on save. Also, the glyphs are compiled on importing, which saves memory consumption and time.
- -no-rtb, --no-reorder-tables
Do not reorder the font’s tables on save.
By default, tables are sorted by tag on save (recommended by the OpenType specification).
- -rts, --recalc-timestamp
Set the
modifiedtimestamp in theheadtable on save.By default, the original
modifiedtimestamp is kept.
Arguments
- INPUT_PATH
Required argument