-
Notifications
You must be signed in to change notification settings - Fork 88
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
glyph-vector/glyph-vector-2 examples do not look at the 3rd order bezier curve bit #58
Comments
How do you get first point off curve for a cubic Bézier considering the explicit form? You mean given first point doesn't correspond to t=0, right? |
A while ago there was a discussion on the Opentype list about this sort of thing. It is legal for a curve to consist of entirely off-curve points. Say 4, at the corner of a square. The rasterizer interpolates them. That was the answer from Microsoft people. So an implied on-curve point is between the first and the last. I think it can be even more extreme - a contour can be made from 3 off-curve points. Font designers rarely do it, that's all. |
Didn't know that. Do you have a pointer to some documentation such that we can add it in the relevant example (where I'm asking to rephrase). It's not the example is not optimal but it is more a partial implementation. |
But freetype outline takes care of normalizing the output, no? |
Ok, no it doesn't, we have to take care of point tags. |
You do interpolate most of the time - just afaic, not the first point; and also always split a 3-order curve into two, with an interpolation in the middle. Difference small but for some glyph, might be visible. |
So we better implement the full method. |
3rd curves only on postscript fonts. 2nd order is sufficient for truetype. |
Hmm, my 'g' is a bit off in the horizonal direction for the MinionPro-Regular.otf |
These are the g's from MinionPro-Regular.otf and MinionPro-It.otf, correctly aligned in the horizontal. from |
The examples ignore the 3rd order bezier curve bit and always intepolate between off-curve points. This is strictly speaking only correct for truetype fonts (which only use 2nd order bezier curves). The difference is small but may be important for some glyphs.
Also I think they assume the first point is always on curve. First point being off is less common, but valid.
I'm not going to fix these, but would push a couple of coments in the relevant places.
I just think the examples should do the right thing if somebody want to use a different font or a different glyph, or documented not to do so quite correctly...
(cairo don't have 2nd order curves - it is either line or 3rd order; but a 2nd order curve is just a 3rd order with duplicated off points).
The text was updated successfully, but these errors were encountered: