Looking up fallback/generic versions of fonts (e.g. Times New Roman)
evilpie opened this issue · comments
At least on Linux looking up the font "Times New Roman" with select_family_by_name
doesn't find the fallback font "Tinos".
On the other hand:
fc-match "Times New Roman"
finds it- Firefox uses it
Fontconfig::find
does too
Is that an intentional limitation? It seems like the method select_generic_font
would be able to find it just fine, but isn't exposed.
This is unlikely to be an intentional choice for this library.
I tried to implement this, but it actually results in a kind of opposite problem: select_family_by_name
will now always match something, even for nonsense family names. This will kind of break the font-kit internal (CSS) font-selection algorithm used for select_best_match
when specifying multiple family names.