Variable font decompose and remove overlaps

I’m creating a variable font whose glyphs have lots of components and overlapping parts, but I don’t need to keep any of this for the interpolation to work (the variation in the font is very simple).

Is there a way to make glyphs remove overlaps (and also decompose components) when generating a variable font?

There is a Decompose Components in Variable Font custom parameter. But none for remove overlap, yet.

Thanks, I tried it and I’m getting:

Can’t convert to compatible TrueType curves.
Glyph ‘dal-ar.cv22’ is not compatible.

though the glyphs should be compatible even after decomposing (which I verified by decomposing the components manually).

My actual problem is that, one of my glyphs is a mirrored component of another glyph and this wasn’t an issue when I was generating CFF font and removing the overlaps, but now the reversed component causes overlapping parts to be cut out.

Can you send me that glyph?

I sent the whole font.

I ended up generating two instances for the two masters (the base master and the bracket layer), and then creating a variable font with FontTools varLib and it seems to work fine, and it even fixes the mark positioning issue with the bracket later.

1 Like

currently working on a path topology that needs remove overlapp to apply path offset on export. would be great to have that available

1 Like

Hello, is there yet a Remove Overlap custom parameter for exporting varibale fonts? Cheers, J.

What for?

Well, so that you do not have overlapping paths. Not useful?

What for? Overlaps are OK in variable fonts.

Really? It is risky to send a book to a offset printer where the font has overlaps on a hundred of pages. For a laser cutter it would be a nightmare. Sometimes overlaps are also visible on some screens (if you zoom in and out for instance). Would be good to be able to remove them with a parameter, if you like.

That are valid point. Until the full toolchain is compatible with the new requirements, you should not use variable fonts.

The problem with removing the overlap is that if might change the topology of the paths that cab break the compatibility.

We are looking into how that could be controlled.

1 Like

Keeping overlaps for variable fonts would have some rendering issues in Adobe apps. i.e. when the top of a stem meets the a horizontal bar, they might appear to be 1 pixel off in certain sizes in illustrator (like the stem of E is 1 pixel higher than its top bar). Even outlining glyphs would not help

This can be taken care of with reconnecting the nodes.

The change of topology after removing overlaps can be (relatively easily) controlled, but the change of origin points might not. Sometimes when you execute the remove overlap filter for all the (compatible) masters, origins of points might change on one of them and it the curves can still be compatible (like the origin of point of the dot on i) so you have to re-check every glyph.

Hi @GeorgSeifert, is there an update about having a custom parameter for ‘decompose and remove overlaps’ for variable fonts? I would like to do it as well, because I would like to fix some ‘rendering issues’ like this
Screenshot 2022-10-11 at 09.38.25
The leftRightArrow is a composite glyph:

This is just one example.

Thanks for the reminder. I just had a look and you need two things: A “Decompose Glyphs” and a “Filter = RemoveOverlap” custom parameter. Only that the later would only work on the first master. I fixed that.

1 Like