Skip to content

Wrapper around fonttools (pyftsubset) to extract characters of a font for webperfs

Notifications You must be signed in to change notification settings

Mappy/filter-font

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wrapper around fonttools (pyftsubset) to extract characters of a font

Python script that automate the extraction of a subset of a font. useful for CSS3 property unicode-range

docker run -it --rm \
  -e FONT_NAME=myfont.woff  \
  -e FONT_FILES_KEYS=key1 key2  \
  -e USERID=${UID}  \
  -v where-my-font-and-light-range-is/:/tmp/in/  \
  -v where-to-write-less/:/tmp/less/  \
  -v where-to-write-font/:/tmp/font  \
  fonttools

Generate 2 fonts per key plus 2 for the rest

  • myfont-key1.woff
  • myfont-key1.woff2
  • myfont-key2.woff
  • myfont-key2.woff2
  • myfont-the-rest.woff
  • myfont-the-rest.woff2

About

Wrapper around fonttools (pyftsubset) to extract characters of a font for webperfs

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published