Created attachment 134130 [details] Test program Iām trying to render variable fonts with Cairo and FreeType. If I call FT_Set_Var_Design_Coordinates() before rendering any glyphs things work as expected, but if a glyph is rendered with certain variable coordinates it will not be affected by FT_Set_Var_Design_Coordinates() and will be always rendered with the old coordinates. Looks like the glyph cash does not take variable coordinates into account. The attached test program shows the issue; the second A should be rendered using the light not the heavy weight.
Created attachment 134131 [details] Font used
Created attachment 134132 [details] Wrong output
Correct. Currently cairo doesn't know about variation coordinates. Your best bet is to create a separate FT_Face every time you change variations. Matthias Clasen and I are going to look into fixing this (and wiring up variations in Pango) next week.
Creating a new face seems to work indeed.
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/cairo/cairo/issues/235.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.