diff --git a/pages/linux/fonttools-subset.md b/pages/linux/fonttools-subset.md new file mode 100644 index 0000000000..b4d855097e --- /dev/null +++ b/pages/linux/fonttools-subset.md @@ -0,0 +1,20 @@ +# fonttools subset + +> Generate subsets of fonts or optimize file sizes. +> More information: . + +- 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}}` diff --git a/pages/linux/fonttools.md b/pages/linux/fonttools.md new file mode 100644 index 0000000000..087d8f21d8 --- /dev/null +++ b/pages/linux/fonttools.md @@ -0,0 +1,12 @@ +# fonttools + +> Manipulate fonts in Python. +> More information: . + +- 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`