Opentype-SVG font is too tall in Illustrator, leaving weird artifacts behind

I’m designing an SVG single-stroke font for engraving/laser cutting, and so far everything is going great!

One weird hiccup is that in Illustrator, it sometimes leaves behind weird artifacts and cuts off the tops of the characters when moving the text object.

You can see it in action here:

Now I know this is probably an Illustrator bug, but it also seems to be caused by the characters being taller than Illustrator expects — you can see how the top row in that GIF is taller than the containing bounding box.

Is there a way, within Glyphs, to reduce the size of the characters so they’re the right height? I tried scaling them manually and changing the units per Em globally, but neither of those things worked.

This tutorial should help: https://glyphsapp.com/tutorials/vertical-metrics

Thanks for the response!

I tried modifying all of the values from that article (namely setting the hheaAscender, typoAscender, hheaDescender, typoDescender, hheaLineGap, winAscent, winDescent, and typoLineGap in both the Master and Instance), but they don’t seem to do anything — my guess is since the glyphs are all made purely of SVGs, something isn’t working correctly.

I also tried setting the lowercase d ascender height to be the height of all of the capitals, as described here, so no avail.

have you played around with the UPM? Most of the vertical metrics settings are ignored by Adobe app.

And the height of the lowercase d is taken from the fallback layer. Do you only have SVG layers in the font or also b&w default layers?

@GeorgSeifert, I have. It seems to just affect the horizontal spacing, not the overall character scale.

@mekkablue, There is a fallback layer, but it uses the same SVG (rasterized) as the svg layer. Actually, I don’t know if it is rasterized — I drag/dropped the same exact SVG into both the master and svg layer.

Each glyph is built like so:

{
glyphname = A;
lastChange = "2020-01-07 19:17:11 +0000";
layers = (
{
backgroundImage = {
crop = "{{0, 0}, {1000, 1000}}";
imagePath = A.svg;
transform = "{0.7, 0, 0, 0.7, 0, 0}";
};
layerId = "8D6B4A51-5022-4555-B198-7047F31AAE2C";
width = 1000;
},
{
associatedMasterId = "8D6B4A51-5022-4555-B198-7047F31AAE2C";
backgroundImage = {
crop = "{{0, 0}, {1000, 1000}}";
imagePath = A.svg;
transform = "{0.7, 0, 0, 0.7, 0, 0}";
};
layerId = "D7815C0B-AC43-4166-81D9-61187D2D7FEC";
name = svg;
width = 1000;
}
);
unicode = 0041;
},

The default layer need some regular outlines. Otherwise you get problems with bounding box calculations. Illustrator picks some letters (lowercase ‘d’ if I remember correctly) to compute the position of the first baseline.

Seems like you added a background image rather than outlines. Consider making simple rectangles, especially in lowercase d, on the layer called ‘Regular’ (or whatever your master is called).

And are you using the Adobe Fonts folder?
http://www.glyphsapp.com/tutorials/testing-your-fonts-in-adobe-apps