Skip to content

Cannot load generic font family on MacOS #26

@38

Description

@38

Hi,

Thanks for the great crate, I used this to load system fonts for my crate Plotters. Recently we've added a feature that supports generic font families like serif, serif-sans and monospace.

On Linux, query a generic font family will return expected result. But On MacOS, it seems font-loader doesn't have a way to load generic font family and querying "serif" will directly return FontNotFound.

I believe CTFontStylisticClass should be one way to query the generic font class.

Also there's a behavior difference on MacOS and Linux when font is not found. On Linux it returns the default font, on MacOS it returns an error.

Could you please give some guidance on this stuff ?

Thanks!


Update, just tried windows it seems it constantly return arial font if the requested font is not exists. Including requesting the general font families

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions