fontdb
fontdb copied to clipboard
A simple, in-memory font database with CSS-like queries.
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...
I was wondering why some fonts in my scan had unexpected family names (e.g. `DejaVu Sans Light` instead of `DejaVu Sans`)... according to the [Name ID docs](https://docs.microsoft.com/en-us/typography/opentype/spec/name), ID=1 is the...
Using standard DejaVu system fonts: ``` $ fc-list ... /usr/share/fonts/dejavu/DejaVuSans-Oblique.ttf: DejaVu Sans:style=Oblique ``` Properties detected by `fontdb`: name | family | style | weight | stretch | monospace | path...
I'm currently looking to somewhat replicating the font lookup a browser does, and I stumbled upon this crate. However it seems to only be able to match against the family...
https://www.w3.org/TR/2018/REC-css-fonts-3-20180920/#propdef-font-feature-settings
My issue: Browsers allow you to provide a custom name for a font file and even do not expose the default provided by the file content font. So for something...
Paths retrieved from `fontconfig` may contain `~` and need to be expanded. There is probably a prettier/better way to do this but I've never looked at any Rust code before...
When running my app, I found strange `is_file` in flamegraph(look at the right side of flamegraph)  Path.is_file() - get file metadata from disk which is slow...