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
- 809 Font Technology
- 1.1K Technique and Theory
- 625 Type Business
- 447 Type Design Critiques
- 546 Type Design Software
- 30 Punchcutting
- 137 Lettering and Calligraphy
- 84 Technique and Theory
- 53 Lettering Critiques
- 489 Typography
- 304 History of Typography
- 115 Education
- 70 Resources
- 502 Announcements
- 80 Events
- 106 Job Postings
- 150 Type Releases
- 165 Miscellaneous News
- 271 About TypeDrawers
- 53 TypeDrawers Announcements
- 117 Suggestions and Bug Reports