Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

should reverse path direction when going cu2qu #174

Closed
anthrotype opened this issue Mar 20, 2023 · 1 comment · Fixed by #475
Closed

should reverse path direction when going cu2qu #174

anthrotype opened this issue Mar 20, 2023 · 1 comment · Fixed by #475

Comments

@anthrotype
Copy link
Member

by default fontmake (via ufo2ft and cu2qu) reverses the glyph contours' winding direction when building TrueType glyf outlines, assuming that sources contain PostScript-style cubic beziers that OT spec recommends to be set in counter-clockwise order.
If that is true (we don't actually validate that), then the resulting TrueType glyf outlines after the flipping become clockwise, which is what the TrueType spec in turn recommends.

https://github.com/googlefonts/ufo2ft/blob/fca66fe3ea1ea88ffb36f8264b21ce042d3afd05/Lib/ufo2ft/__init__.py#L223

To match fontmake-py, fontamake-rs could similarly apply its ReverseContourPen by default, and have an option to not to, when building glyf table.

I've always thought that path direction didn't matter, until I stumbled on this: adobe-fonts/source-han-serif#182

@devosb
Copy link

devosb commented May 5, 2023

I have seen path direction matter in Bengali and Gunjala Gondi scripts. If the directions were not correct, then there would be dropouts in the overlap between consonants and vowel signs. In Windows, using Word, the problem occurred at large point sizes (above 20 or so) and/or zoomed in.

If a single glyph had a mis-oriented contour, I would see it in SILE.

anthrotype added a commit that referenced this issue Oct 4, 2023
using the new kurbo's BezPath::reverse_subpaths()

Fixes #174
anthrotype added a commit that referenced this issue Oct 4, 2023
using the new kurbo's BezPath::reverse_subpaths()

Fixes #174
anthrotype added a commit that referenced this issue Oct 4, 2023
using the new kurbo's BezPath::reverse_subpaths()

Fixes #174
anthrotype added a commit that referenced this issue Oct 5, 2023
using the new kurbo's BezPath::reverse_subpaths()

Fixes #174
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants