Skip to content

Instantly share code, notes, and snippets.

@qwIvan
Created February 23, 2016 15:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save qwIvan/372fcb16b60e908d65a8 to your computer and use it in GitHub Desktop.
Save qwIvan/372fcb16b60e908d65a8 to your computer and use it in GitHub Desktop.
# Pre-operation for some non-standard Chinese font file
Open("font_b.ttf")
SelectAll()
ScaleToEm(1024)
Generate("temp.ttf", "", 0x14)
Close()
# Open English font and merge to the Chinese font
Open("font_a.ttf")
SelectAll()
ScaleToEm(1024)
MergeFonts("temp.ttf")
SetFontNames("FontName", "Font Family", "Full Name", "Style", "")
Generate("font_merged.ttf", "", 0x14)
Close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment