Transforming/editing glyphs with fonttools?
Jon Palmisciano
Posts: 10
Hello everyone!
I'm diving back into fonttools again and am wondering if there is a way to transform/edit glyphs with fonttools. Here are some examples of workflows I'd want to be able to do:
I'm diving back into fonttools again and am wondering if there is a way to transform/edit glyphs with fonttools. Here are some examples of workflows I'd want to be able to do:
- Scale all the glyphs in a font horizontally to 125% width. (Yes, I know this is a type crime, but this is for an experiment, not production use.)
- Find all points touching (or close to) the baseline and shift them down by 10 units.
- etc.
Tagged:
0
Comments
-
It's much easier to do this stuff at the UFO level. Fontmake supports filtering UFOs, including a filter which mimics the Glyphs "Transformation" filter. See https://github.com/googlefonts/fontmake/blob/main/USAGE.md#outline-filtering1
-
I'll check that out. Thank you, Simon.0
-
Sorry to ressurect an old thread but I'd like to figure out how to do this with fontTools – I'm trying to scale and transform Source Han Sans as I don't know how to edit the sources for those so I'd like to do it just using the TTFs or OTFs. I pieced together this script based off a lonely question and answer on StackOverflow. But now I'm stuck for scaling the metrics, how can I transform that in fontTools?
I found the solution it's to use `fontTools.ttLib.scaleUpem` function.0
Categories
- All Categories
- 43 Introductions
- 3.7K Typeface Design
- 798 Font Technology
- 1K Technique and Theory
- 617 Type Business
- 444 Type Design Critiques
- 541 Type Design Software
- 30 Punchcutting
- 136 Lettering and Calligraphy
- 83 Technique and Theory
- 53 Lettering Critiques
- 483 Typography
- 301 History of Typography
- 114 Education
- 68 Resources
- 498 Announcements
- 79 Events
- 105 Job Postings
- 148 Type Releases
- 165 Miscellaneous News
- 269 About TypeDrawers
- 53 TypeDrawers Announcements
- 116 Suggestions and Bug Reports