Skip to content
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

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

Open
evilpie opened this issue Dec 2, 2023 · 2 comments
Open

Comments

@evilpie
Copy link
Contributor

evilpie commented Dec 2, 2023

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 evilpie changed the title Looking up fallback/generic versions of fonts (e.g. Times New Roman) with Looking up fallback/generic versions of fonts (e.g. Times New Roman) Dec 2, 2023
@jdm
Copy link
Member

jdm commented Dec 2, 2023

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

@evilpie
Copy link
Contributor Author

evilpie commented Dec 16, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants