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

Load system UI font #216

Open
colinmarc opened this issue Oct 24, 2023 · 2 comments
Open

Load system UI font #216

colinmarc opened this issue Oct 24, 2023 · 2 comments

Comments

@colinmarc
Copy link

In Webkit, I can use the system-ui family to grab, for example, the San Francisco font on mac.

Is there a way to do that with this library? It would be nice to match the font to the OS, when available.

I tried the following:

select_best_match(
    &[font_kit::family_name::FamilyName::Title(
        "system-ui".to_string(),
    )],
    &font_kit::properties::Properties::new(),
)

But no dice.

@colinmarc
Copy link
Author

Looks like on mac, this is available in a newer version of core-text than is currently pinned by this library:

https://github.com/servo/core-foundation-rs/blob/master/core-text/src/font.rs#L240

@jayvdb
Copy link
Contributor

jayvdb commented Jul 5, 2024

#234 has updated core-text to the latest.

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