Skip to content

Instantly share code, notes, and snippets.

@mennwebs
Created September 3, 2025 15:21
Show Gist options
  • Save mennwebs/83a854a4e1517b1d93f3599405a15123 to your computer and use it in GitHub Desktop.
Save mennwebs/83a854a4e1517b1d93f3599405a15123 to your computer and use it in GitHub Desktop.
Merge Font (Such as Thai and English)

Merge Font with fonttools

1. Install fonttools

brew install fonttools

2. Prepare the fonts

Put two fonts in a folder, e.g.

  • MiSansLatin.ttf
  • MiSansThai.ttf

3. Use pyftmerge

pyftmerge MiSansLatin.ttf MiSansThai.ttf

4. Rename the font (optional but recommended)

ttx merged.ttf

This creates a merged.ttx (XML). Open it, find the entries (IDs 1, 4, 6 are most important: font family, full name, PostScript name), and replace them with "MiSans".

Then rebuild:

ttx merged.ttx

You now get merged#1.ttf with the corrected name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment