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

The Weight property is ignored on Linux #56

Closed
RazrFalcon opened this issue May 22, 2019 · 1 comment
Closed

The Weight property is ignored on Linux #56

RazrFalcon opened this issue May 22, 2019 · 1 comment
Labels
bug Something isn't working fontconfig

Comments

@RazrFalcon
Copy link
Contributor

extern crate font_kit;

fn main() {
    let names = vec![font_kit::family_name::FamilyName::Title("Arial".to_string())];
    let properties = font_kit::properties::Properties {
        style: font_kit::properties::Style::Normal,
        weight: font_kit::properties::Weight::BOLD,
        stretch: font_kit::properties::Stretch::NORMAL,
    };
    let handle = font_kit::source::SystemSource::new().select_best_match(&names, &properties).unwrap();
    println!("{:?}", handle); // Path { path: "/usr/share/fonts/corefonts/arial.ttf", font_index: 0 }
}
~> fc-match 'Arial :weight=700' --format="%{file}\n"
/usr/share/fonts/corefonts/arialbd.ttf
@pcwalton pcwalton added the bug Something isn't working label May 24, 2019
@RazrFalcon
Copy link
Contributor Author

Works on Ubuntu 18.04, so it's probably a fontconfig's problem on my gentoo.

Will add a test case later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fontconfig
Projects
None yet
Development

No branches or pull requests

2 participants