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
- 40 Introductions
- 3.6K Typeface Design
- 787 Font Technology
- 1K Technique and Theory
- 606 Type Business
- 443 Type Design Critiques
- 534 Type Design Software
- 30 Punchcutting
- 135 Lettering and Calligraphy
- 82 Technique and Theory
- 53 Lettering Critiques
- 475 Typography
- 298 History of Typography
- 112 Education
- 65 Resources
- 488 Announcements
- 77 Events
- 105 Job Postings
- 148 Type Releases
- 157 Miscellaneous News
- 267 About TypeDrawers
- 53 TypeDrawers Announcements
- 115 Suggestions and Bug Reports