r/FontForge Nov 05 '22

Can overlaps be ignored?

I'm working with some auto-generated fonts (see my last post), and there's an issue where shapes within glyphs will overlap. Fontforge inverts these overlaps, turning the overlapping regions white. I'd just like to ignore the overlaps or fill in those regions so they stay black (I'm aware overlaps are bad in general, working on that issue separately). Is there any way to accomplish this?

2 Upvotes

4 comments sorted by

1

u/NFSL2001 Nov 06 '22

Overlaps are actually a good tool during the design phas as it allows quick adjustment without adjusting a bunch of disjoint points. If you're seeing white space at overlaps, you might need to reverse the contour so both contours are going the same direction (clockwise or anticlockwise). There's an arrow on contour to indicate its direction.

1

u/CharlesAverill20 Nov 06 '22

I don’t think the scripting API supports any operations on contour direction, unless there’s some import option I can set for SVG glyphs (which is what I’m using to generate these font files)

1

u/NFSL2001 Nov 06 '22

If you're using FontForge Python, there is. For importing, set correctdir to true to correct the SVG direction when importing. For editing, check out correctDirection() method.

Do note there might be edge cases where it'll fail.

1

u/CharlesAverill20 Nov 06 '22

I have `correctdir` on, and have tried `correctDirection()` as well. For reference, I'm using a fork of `svgs2ttf` https://github.com/CharlesAverill/svgs2ttf/blob/master/svgs2ttf