font-kit icon indicating copy to clipboard operation
font-kit copied to clipboard

Looking up fallback/generic versions of fonts (e.g. Times New Roman)

Open evilpie opened this issue 2 years ago • 2 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:

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.

evilpie avatar Dec 02 '23 12:12 evilpie

This is unlikely to be an intentional choice for this library.

jdm avatar Dec 02 '23 14:12 jdm

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.

evilpie avatar Dec 16 '23 21:12 evilpie