Font Handling
We want to allow a nicer font-selector dialog. We can initially still use QFontDatabase but a personal font selection dialog would be great because then we can be more sure the correct font is selected.
Names:
OpenType has many name ids.
- For the purpose of SVG/CSS, we need to use IDs 16/17 when it is a variable font, 21/22 when not, if 22/21 is missing fall back on 16/17, otherwise fallback on 1/2 (https://learn.microsoft.com/en-us/typography/opentype/spec/stat)
- We can't use the stat table presently, because harfbuzz doesn't expose it (though does parse it). It's not super-important, thankfully, as CSS doesn't rely on style names.
- Variable font instances are accessible.
- There will be localizations of font names available, these need to be stored and made visible too.
- We need to store the family name seperately, so we can use a proxymodel to display only families.
For the icon...
- For b&w make a mask.
- For color make a semi-transparent image.
- We can generate one either per-name or per-script (using QFontDatabase::sampleForWritingSystem).
- We should be careful with instances: there might be 100+ of them.
Other...
- We should keep metadata for supported languages, so people can filter.
- Meta data for font-palette-naming as well as font-feature-naming, so people can name the font features (https://drafts.csswg.org/css-fonts-4/#font-feature-values)
- People have requested selecting special font folders to search in.
- How do we keep our resources in sync with fontconfig?
- We should proly do font-caching inside the Document, not the fontregistery:
- We can mark entries as spurious by keeping track of which shape/layer needs them per relayout.
- This will also be helpful for CSS
@font-face
. - As well as help with export to PSD.
Edited by Wolthera van Hövell