Skip to content

On Linux, GenericFamily::SystemUi should fall back to sans-serif #323

@valadaptive

Description

@valadaptive

On my machine, there are a lot of languages/Unicode ranges that the GenericFamily::SystemUi family doesn't display because it doesn't have any fonts to fall back to. It wants to fall back to various "Noto Sans [script] UI" fonts, which I don't have installed:

Image

Changing this to GenericFamily::SansSerif works, but this changes the preferred family as well:

Image

Fontconfig comes with a stock config file to fall back to sans-serif for all families that are not sans-serif, serif, or monospace. This includes the other generic families like system-ui. This lets other applications (e.g. Inkscape) fall back properly:

Image

In lieu of reimplementing all of fontconfig's matching code, we could probably just hardcode this fallback behavior here. I'm not sure how it interacts with language mapping or the "style classes", or about the right level to implement it at.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions