daltonmaag / ubuntu

Other
31 stars 5 forks source link

Long-term: recover/clean-up non-overlapped Postscript-style cubics #25

Open sladen opened 6 years ago

sladen commented 6 years ago

Non-urgent, but needed in the long-term. Cubics are nicer for editing + CFF hinting is nicer + intact overlaps are needed before an attempt can be made at a variable "Ubuntu Extreme" font:

As a starting point, presumably the curves can be recovered from one of more of the following:

anthrotype commented 6 years ago

intact overlaps are needed before an attempt can be made at a variable

just to clarify, it's not a requirement that variable fonts have overlapping contours, it's just that noramally it is easier to draw interpolatable shapes when you have the overlaps. It's totally possible to draw interpolatable outlines without overlaps, just more time-consuming. For tricky shapes, you'd have to resort to adding duplicate points or turning line segments into flat (degenerate) curves, etc.

If one goes through the trouble, then the result actually may look better in some environments. For example, on OSX if you have overlapping shapes, if you zoom in and squeeze your eyes you can still notice a halo around the overlapping contour segments.

madig commented 6 years ago

I'd go for overlaps for maintainability reasons.

Can you post a screenshot of what you're seeing with overlaps?

anthrotype commented 6 years ago

e.g. have a look at the first screenshoot in here (shows two overlapping components) https://github.com/googlei18n/fontmake/issues/253#issuecomment-335535293

or this Q with overlapping contours from NotoSansMono-Regular which I just made with fontmake with --keep-overlaps option (zoom if you can't see, the halo is there)

q

(this is nothing new, by the way)

HinTak commented 6 years ago

I think the recommendation against overlapping curves i partly due to confusion and implementation of winding rules in postscript vs truetype. I don't remember which is which, but one of them had a even-odd winding rule and the other has an 'any' winding rule. This affects scan-converting. Not-overlapping means that there is no difference between the result of even-old winding vs 'any' winding. This makes life easier to work on differing (and some buggy) rendering engines.