You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For example "light" is 300 in both specs, but 200 in the constants file.
This is likely to result in mis-matches in font queries because FontEntry objects have the wrong value.
Fixing this may require bumping the font database version and re-generating the font database.
There is a potential tension here because the constants are used for scoring closeness of match, but are also used for interpreting the contents of font files.
The text was updated successfully, but these errors were encountered:
There is one fortunate feature that the font weights are not being used heavily by the higher-level code right now - the only values that the querying code sees are likely "normal" and "bold" which are mapped correctly.
Also, this is entirely backend code - these names are used for matching font names to font queries, but font queries are not really end-user exposed, so I think that updating this list to be more inclusive and correct is fine. It should silently make font matches better where it matters, and won't break end-user code.
The only possible end-user breakage is if there is something that was matching before and now doesn't, but because only "bold" and "normal" are really exposed, we should be fine on that.
The names of the weights are defined here: https://docs.microsoft.com/en-us/typography/opentype/spec/os2#usweightclass
But these don't match the names defined here in all cases:
enable/kiva/fonttools/_constants.py
Lines 90 to 105 in 718c863
For example "light" is 300 in both specs, but 200 in the constants file.
This is likely to result in mis-matches in font queries because
FontEntry
objects have the wrong value.Fixing this may require bumping the font database version and re-generating the font database.
There is a potential tension here because the constants are used for scoring closeness of match, but are also used for interpreting the contents of font files.
The text was updated successfully, but these errors were encountered: