fontdb
fontdb copied to clipboard
Support automatic determination of default family names on Linux from fontconfig
I hope that this is to some extent in scope of fontdb, feel free to close otherwise.
The default families in fontdb are coded to Arial, etc. as documented. It would be nice if fontdb, when the fontconfig feature is enabled, would read and interpret the settings from fontconfig to determine the fonts that alias "Sans Serif, "Serif", "Cursive", etc.
For context, this would allow Slint to get rid of fontconfig bindings to build without linking any C libraries besides xcb if using the X11 backend (Slint's Wayland backend dlopen
s the required C libraries).
@Riey does fontconfig-parser
supports generic font families query?
@RazrFalcon No, it doesn't have any query functions only parsing.
rust-fontconfig has a query function.
It's a very heavy dependency.
rust-fontconfig has a query function.
That's not fontconfig query only read dir
tag to get font files more like current fontdb's behavior(and even ignore include
tag which is for nested config files).
What you want should evaluate whole match
and alias
tags.
This one should be improved, but not perfect. Someone has to write a complete fontconfig parser first.