Page 1 of 1

Why do overlapping curves cause overlap region to disappear?

Posted: Wed Nov 30, 2016 11:53 pm
by ben8238723
I'm very confused. I have two closed curves and when one I overlap them the overlapped region disappears (is invisible). Why would this be? Presumably a related phenomena, when I try to use join on the two curves thinking this would solve the problem both curves effectively disappear, and where they were there are just a few dots in free space. Likely it's important to note that these curves were created via the import image feature. I tried optimizing the curves to see if maybe something was weird that that might fix.

Also, presumably related, since the 10.1 update today many characters in my font which looked fine suddenly have regions of hollowness, again, as though curves are overlapping and being made invisible for some reason.

Any help? What am I not understanding and how can I fix this? Thanks.

Re: Why do overlapping curves cause overlap region to disappear?

Posted: Thu Dec 01, 2016 4:38 am
by Bhikkhu Pesala
Overlapping contours (intersecting contours) should be joined, or you fonts will look like this if exported with CFF Postscript outlines. Earlier versions of FontCreator did not make it obvious that this is a potential problem.

Use the Get Union of Contours command to join them. If the curves still disappear, share the image that you're importing and someone else can try to reproduce the problem. It does still happen sometimes.
Intersecting Contours.png
Intersecting Contours.png (29.18 KiB) Viewed 6472 times

Re: Why do overlapping curves cause overlap region to disappear?

Posted: Fri Dec 02, 2016 5:38 am
by ben8238723
So this is weird... the problem has suddenly disappeared... And it disappeared immediately after my virus scanner deleted FCOutDrw.dll because it thought it was the Trojan-Banker.Win32.Banbra.vdfk malware/virus (I posted about that issue in this thread). In that thread they mention that deleting that file may change how the font is rendered on screen...

Re: Why do overlapping curves cause overlap region to disappear?

Posted: Fri Dec 02, 2016 2:44 pm
by ben8238723
This explains why this is now happening...
Erwin Denissen wrote:FCOutDrw is a new dynamic linked library (DLL) which is used to draw smooth glyph outlines. If the file is removed, FontCreator will use the old drawing method.

The new method uses the even-odd rule when it comes to determining whether an area is inside or outside while the old method uses the non-zero winding rule.
See: https://en.wikipedia.org/wiki/Nonzero-rule
Have not yet been able to properly resolve the actual overlap, but I'll give it another shot.

Re: Why do overlapping curves cause overlap region to disappear?

Posted: Fri Dec 02, 2016 4:27 pm
by Erwin Denissen
We usually don't like duplicate posts, but in this case this post so relevant:
ben8238723 wrote:
Bhikkhu Pesala wrote:If I am not mistaken you can run FontCreator 10.1 without this DLL, but the preview of outlines will not be quite as smooth.

Is it your experience that FontCreator runs, or does it fail to start due to the missing DLL?
FontCreator does still run, and very oddly having the virus scanner delete FCOutDrw.dll fixed a rendering problem I was seeing and reported here. So maybe the font isn't as smooth in preview, but it actually looks right/better, it isn't screwing up when displaying overlapped curves.
FCOutDrw is a new dynamic linked library (DLL) which is used to draw smooth glyph outlines. If the file is removed, FontCreator will use the old drawing method. To apply this workaround, do close FontCreator and then delete the file FCOutDrw.dll which can be found in Windows system folder. E.g. here:
C:\Windows\SysWOW64\FCOutDrw.dll

The new method uses the even-odd rule when it comes to determining whether an area is inside or outside while the old method uses the non-zero winding rule.
See: https://en.wikipedia.org/wiki/Nonzero-rule

The new method uses the graphical device interface to draw outlines, which should be faster, and is smooth. The downside at the moment is the fact we can't change the fill mode.
oldnewdraw.png
oldnewdraw.png (13.74 KiB) Viewed 6451 times
The first line is drawn with the old method, the second line is the improved one.

The "F" consist of a single contour that is self-intersecting.

Re: Why do overlapping curves cause overlap region to disappear?

Posted: Fri Dec 02, 2016 4:29 pm
by Erwin Denissen
ben8238723 wrote:Have not yet been able to properly resolve the actual overlap, but I'll give it another shot.
If the overlap is related to a composite glyph, you will need to make it simple, but you can also decide to ignore this white overlap, as the exported font won't change.

Re: Why do overlapping curves cause overlap region to disappear?

Posted: Mon Dec 05, 2016 7:31 pm
by Erwin Denissen
Bhikkhu Pesala wrote:Overlapping contours (intersecting contours) should be joined, or you fonts will look like this if exported with CFF Postscript outlines.
Right now overlapping contours should be avoided with fonts containing CFF based outlines, but we suspect this will no longer be an issue in the near future.

So we will try to find a solution which allows you to show overlapping contours the way they used to be.

Re: Why do overlapping curves cause overlap region to disappear?

Posted: Tue Dec 06, 2016 4:55 pm
by Erwin Denissen
The update released earlier today solves the issue.
improveddraw.png
improveddraw.png (2.11 KiB) Viewed 6415 times
You can now set the fill mode through the Options dialog:
fillmode.png
fillmode.png (11.09 KiB) Viewed 6415 times

Re: Why do overlapping curves cause overlap region to disappear?

Posted: Tue Dec 06, 2016 4:57 pm
by ben8238723
Great! Thanks for the speedy fix.