Saved searches

Use saved searches to filter your results more quickly

Cancel Create saved search Sign up Reseting focus

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

Change the letter width of some glyphs in a TTF file #5439

josephernest started this conversation in General Jun 25, 2024 · 0 comments Something went wrong. Quote reply

>'s edit

<> deleted this content .>'s edit Something went wrong. josephernest Jun 25, 2024

I need to open the Montserrat font ( Montserrat-VariableFont_wght.ttf ), change all digit glyphs (0, 1, . 9) to a fixed constant width, and then save it back into a new TTF file.

Is there something like this (pseudo-code):

import fontforge font = fontforge.open('font.ttf') glyph = font.glyph("1") glyph.width = 10 font.save() font.close() 

How to do this with Python scripting? Is there an example documented somewhere with something close to this?

Thanks a lot in advance :)

Beta Was this translation helpful? Give feedback.

1 You must be logged in to vote