fonttools-subset: add page (#17888)

This commit is contained in:
Callum Rafter
2025-09-06 18:01:08 +01:00
committed by GitHub
parent 8f7ff2091f
commit 09ebf7923d
2 changed files with 32 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
# fonttools subset
> Generate subsets of fonts or optimize file sizes.
> More information: <https://fonttools.readthedocs.io/en/latest/subset/index.html>.
- Subset a TTF font file to the Basic Latin Unicode block:
`fonttools subset {{path/to/font.ttf}} --unicodes=U+0000-007F`
- Change the file type to WOFF2:
`fonttools subset {{path/to/font.ttf}} --unicodes=U+0000-007F --flavor=woff2`
- Keep only the onum (oldstyle figures) and kern (kerning) OpenType font features:
`fonttools subset {{path/to/font.ttf}} --unicodes=U+0000-007F --layout-features=onum,kern`
- Set the output file's name:
`fonttools subset {{path/to/font.ttf}} --unicodes=U+0000-007F --output-file={{path/to/subset.ttf}}`
+12
View File
@@ -0,0 +1,12 @@
# fonttools
> Manipulate fonts in Python.
> More information: <https://fonttools.readthedocs.io/en/latest/>.
- Subset a TTF font file to the Basic Latin Unicode block:
`fonttools subset {{path/to/font.ttf}} --unicodes=U+0000-007F`
- Display help:
`fonttools --help`