Inkscape to FontForge tip

Today on the FontForge mailing list, someone asked “if there is a way to scale a glyph to fit it in a bounding box” and George Williams replied with this script, in FontForge’s own scripting language:

cur_bbox = GlyphInfo("BBox") Move(-cur_bbox[0],-cur_bbox[1]) Scale(desired_width/(cur_bbox[2]-cur_bbox[1]), desired_height/(cur_bbox[3]-cur_bbox[1])) Move(desired_x,desired_y)

This is really useful for importing arbitrary SVG shapes drawn in Inkscape into FontForge!

Creative Commons License
The Inkscape to FontForge tip by David Crossland, except the quotations and unless otherwise expressly stated, is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License.

Comments

Leave a Reply