How to add a new glyph to a font with FontTools?

roipoussiere
Posts: 5
I'm trying to add a new glyph to a font. I managed to draw by glyph to a pen, then saved it to a glyph object with:
new_glyph = pen.glyph()Now I would like to do something like:
font.getGlyphSet()["e_m"] = new_glyphor (with a ttf font):
font["glyf"]["e_m"] = new_glyph
How to add a new glyph to a font with FontTools?
Thank you!
Tagged:
0
Comments
-
For anyone interested, the solution was to:1. create a new UFO;2. add the glyph to this UFO;3. compile this UFO to a font of the same type of the source font;4. merge the two fonts with fonttools.merge.1
Categories
- All Categories
- 43 Introductions
- 3.7K Typeface Design
- 814 Font Technology
- 1.1K Technique and Theory
- 629 Type Business
- 449 Type Design Critiques
- 548 Type Design Software
- 30 Punchcutting
- 137 Lettering and Calligraphy
- 84 Technique and Theory
- 53 Lettering Critiques
- 495 Typography
- 307 History of Typography
- 115 Education
- 73 Resources
- 509 Announcements
- 82 Events
- 107 Job Postings
- 153 Type Releases
- 166 Miscellaneous News
- 271 About TypeDrawers
- 53 TypeDrawers Announcements
- 117 Suggestions and Bug Reports