-
Notifications
You must be signed in to change notification settings - Fork 94
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
reversed outlines when building fonts from quadratic curves #1045
Comments
there's --keep-direction option, have you tried with that? |
Ah it might not be supported by gftools builder |
for a font with quadratic sources and manual hinting, in addition to --keep-direction, you could also pass |
fontmake's defaults are geared towards the most common use case i.e. source containing cubic bezier (hence drawn following PostScript counter-clockwise direction) => TrueType with quadratic curves and clockwise direction |
Okay thanks!
yeah I am aware. |
I feel like you shouldn't need to pass an optional flag to do the right thing. The right thing should be the default. |
but how? |
perhaps are you suggesting something like, if a glyph contours only contain quadratic curves (or any?) then fontmake can assume they are already in the correct direction and not flip it, whereas if there's all (or any?) cubic curves then proceed with the reversal? |
Exactly. |
or you want to sum the signed area of all the glyph's contours to obtain an overall direction and flip accordingly to match the recommeded orientation for a given output format? |
That does sound a bit risky. Wouldn't it work to just not reverse quadratic-only curves? Unless I've misunderstood something, it seems like there is a right order for quadratic curves and we're currently doing the wrong thing by reversing them. |
yeah, there is a recommended order but fontmake isn't actually checking which order it currently is and acting based on that. fontmake doesn't know nor checks whether the current order is right or wrong; it can only know whether the glyph contains all-quadratic, all cubic, or a mix of the two which is also legal in sources. |
technically a font could contain only lines, no curves at all, how do you know in that case what the right thing to do is?.. |
We are trying to onboard a font with quadratic sources and manual hinting. The problem is that the outlines get reversed during export (as if the sources were postscript) and the manual hinting is then completely wrong.
The fonts can be build with manual hinting with gftools builder in that branch: https://github.com/RosaWagner/intel-one-mono/tree/googlefonts
This is the image the designers send after testing:
Their build:
Fontmake build:
cc @simoncozens @m4rc1e
The text was updated successfully, but these errors were encountered: