Why do overlapping curves cause overlap region to disappear?

Get help with FontCreator here. Please do not post feature requests or bug reports here.
Post Reply
ben8238723
Posts: 8
Joined: Wed Nov 30, 2016 11:46 pm

Why do overlapping curves cause overlap region to disappear?

Post 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.
Attachments
overlap.png
overlap.png (18.09 KiB) Viewed 6382 times
Bhikkhu Pesala
Top Typographer
Top Typographer
Posts: 9873
Joined: Tue Oct 29, 2002 5:28 am
Location: Seven Kings, London UK
Contact:

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

Post 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 6375 times
My FontsReviews: MainTypeFont CreatorHelpFC15 + MT12.0 @ Win 10 64-bit build 19045.2486
ben8238723
Posts: 8
Joined: Wed Nov 30, 2016 11:46 pm

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

Post 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...
ben8238723
Posts: 8
Joined: Wed Nov 30, 2016 11:46 pm

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

Post 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.
Erwin Denissen
Moderator
Moderator
Posts: 11108
Joined: Fri Oct 04, 2002 12:41 am
Location: Bilthoven, The Netherlands
Contact:

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

Post 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 6354 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.
Erwin Denissen
High-Logic
Proven Font Technology
Erwin Denissen
Moderator
Moderator
Posts: 11108
Joined: Fri Oct 04, 2002 12:41 am
Location: Bilthoven, The Netherlands
Contact:

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

Post 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.
Erwin Denissen
High-Logic
Proven Font Technology
Erwin Denissen
Moderator
Moderator
Posts: 11108
Joined: Fri Oct 04, 2002 12:41 am
Location: Bilthoven, The Netherlands
Contact:

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

Post 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.
Erwin Denissen
High-Logic
Proven Font Technology
Erwin Denissen
Moderator
Moderator
Posts: 11108
Joined: Fri Oct 04, 2002 12:41 am
Location: Bilthoven, The Netherlands
Contact:

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

Post by Erwin Denissen »

The update released earlier today solves the issue.
improveddraw.png
improveddraw.png (2.11 KiB) Viewed 6318 times
You can now set the fill mode through the Options dialog:
fillmode.png
fillmode.png (11.09 KiB) Viewed 6318 times
Erwin Denissen
High-Logic
Proven Font Technology
ben8238723
Posts: 8
Joined: Wed Nov 30, 2016 11:46 pm

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

Post by ben8238723 »

Great! Thanks for the speedy fix.
Post Reply