-
Notifications
You must be signed in to change notification settings - Fork 608
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
face index vs instance index, and where they apply #3347
Comments
A few different things here:
Now, what I suggest we do, is that when loading a TTC, we mask and only use the lower 16bit of the index. That way you can pass FC_INDEX intact and HB uses the part it needs, and if you get it back from HB you can still use the top bits for instance index setting. We would document this in the API. |
Sounds good to me. |
This seems to fix an issue affecting variable OTC Noto CJK fonts, or at least with the Noto Sans CJK OTC font. For example, running Cherry-picking this on top of 3.0.0, solves the problem. |
In pango tests, I recently noticed that we happily pass 262144 as index to hb_face_create, and get it back from hb_face_get_index().
But hb doesn't seem to do anything with it, since it is not actually a face index, it is a shifted instance id that we've gotten from fontconfig's FC_INDEX field, which is directly populated from freetype's index value.
I think some documentation would be in order on face index vs instance index, what can be passed where and what will be accepted.
As it is currently, it seems unclear if passing 262144 to hb_face_create will apply instance coordinates or not. Maybe >16bit face index should be an error ?
The text was updated successfully, but these errors were encountered: