Last active
November 21, 2021 16:09
-
-
Save oclero/3b05e63abc0d0f481cc608fa0447208e to your computer and use it in GitHub Desktop.
Create font subsets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pip install fonttools brotli zopfli | |
pyftsubset "your-font.otf" --output-file="your-font-subset.woff2" --flavor=woff2 --layout-features="kern,liga,clig,calt,ccmp,locl,mark,mkmk,onum,pnum,smcp,c2sc,frac,lnum,tnum,subs,sups, cswh,dlig,ss01,ss03,zero" --unicodes="U+0000-00A0,U+00A2-00A9,U+00AC-00AE,U+00B0-00B7,U+00B9-00BA,U+00BC-00BE,U+00D7,U+00F7,U+2000-206F,U+2074,U+20AC,U+2122,U+2190-21BB,U+2212,U+2215,U+F8FF,U+FEFF,U+FFFD" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pip install fonttools brotli zopfli | |
pyftsubset "your-font.ttf" --output-file="your-font-subset.woff2" --flavor=woff2 --layout-features="kern,liga,clig,calt,ccmp,locl,mark,mkmk,onum,pnum,smcp,c2sc,frac,lnum,tnum,subs,sups,cswh,dlig,ss01,ss03,zero" --unicodes="U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2190-21BB,U+2212,U+2215,U+FEFF,U+FFFD" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment