Following this, I run this command to generate the SVGs:

fontforge -lang=ff -c 'Open($1); SelectWorthOutputting(); foreach Export("svg"); endloop;' font.ttf 

My font is this. When I open the font and scroll into view some of the glyphs (in FontForge), it looks like this:

enter image description here

Some of the glyphs are cut off, as you can see on that glyph toward the top right, but most are pretty close to the edges (as we would hope):

enter image description here

The descent is at 150, but as you can see the glyph extends below 150. Well, when I export the SVG, it also cuts it off (the viewBox is not large enough to contain the path). So I think "let me extend the descent so it goes below the furthest path in any of the glyphs, and that way my SVGs will not have any missing pieces!"

So I change it in Element > Font Info > General, setting descent to 650, much larger than before, to account for some glyphs that stretch way down below the fold. I also uncheck "Scale Outlines", I don't know what that does but I don't want to adjust anything, I don't want any scaling of the glyphs, I just want the glyph to not be cut off at the bottom.

enter image description here

Hitting Ok it looks like this now:

enter image description here

The glyph we were looking at is now well inside the bounding box, but everything was scaled down! I don't want that, I want the width to stay the same (so the glyphs' sides touch the left and right), but now they are much smaller on the left and right. They scaled down for some reason.

How do I prevent them from scaling down when I do this in FontForge? How do I simply adjust the descent so my glyphs aren't cut off in the SVGs? I am using that Google Font, so I have no control really over the font itself, but changing this one property seems like it will give me the SVGs I need (I am going to do animations on the SVG paths, FWIW).

In other words, I want to make the vertical space larger, but keep the horizontal space for each glyph the same.

It seems I need to somehow change the bounding box dimensions, but I'm not finding a way to do that...

  • This said while knowing nothing about using fontforge- it appears as though all your characters shrinking in the multi character preview box reflects your added descender value having to fit into the same size preview box.
    – Kyle
    Apr 20 at 0:49


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.