-
Notifications
You must be signed in to change notification settings - Fork 11
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
Better support for variable fonts #151
Comments
Overall, this package seems somewhat designed around the WWS font model. For example, |
I'm not sure I'm following you here. Could you explain why would be the alternatives ? |
(This is somewhat orthogonal to variable fonts.) This is the method in question:
if I'm following the code correctly, this only uses the preferred family (aka the typographic family) if it fits the WWS model, and else it uses the WWS family (ignoring the fallbacks when either is empty). Say we have a typographic family "Minion Pro" that has optical sizes "Caption" and "Display". Because optical sizes aren't part of the WWS model, this will have the WWS family names "Minion Pro Caption" and "Minion Pro Display". The typographic name, however, would be "Minion Pro", and group the two fonts under the same family. https://learn.microsoft.com/en-us/typography/opentype/spec/name goes into more details on this. If you grep for In the end, it's a matter of what font model the application wants to expose to the user: R/B/I/BI, WWS, or the "extended" one which allows arbitrary axes (which is particularly useful with, but not restricted to, variable fonts.) Different kinds of applications will want access to the different sets of names, although modern, newly written software should arguably support the extended model. |
I've noticed the following shortcomings in the handling of variable fonts / font variations:
opentype/api/font.Font
orFace
, it's not possible to determine what axes the font offers.Face
has aCoords
field that's documented as "It is empty for non variable fonts.", but since we create faces by simply wrapping fonts in them, Coords is also empty ifFace.SetVariations
hasn't been called, in which case the font is using its default values. I haven't found any other way to know which axes a font supports. I believe what we want is to expose the fvar and STAT tables of a font.footprint
doesn't record which axes a font offers, either.The text was updated successfully, but these errors were encountered: