You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since #46 we use fontdb by @RazrFalcon plus some hacky lists of preferred family names to select fonts. This vaguely works but has several issues:
It probably requires tweaking to work acceptably on all systems
It ignores system/user preferences
It loads more fonts than necessary at start-up. This could be fixed with lazy-loading, but that wouldn't help much given the current fallback mechanism.
The "missing glyph" fallback mechanism simply checks each loaded font in order (ttf_parser::Face::glyph_index), for each missing glyph. This now has caching but is still slow with multiple fallback fonts.
It misses many fonts required for various (especially CJK) scripts. While we could simply add more fonts to the standard lists (or even replace them with some globbing rules), this would compound with (3) and (4) causing performance issues for any glyph not in the first (few) fonts and potentially also at start-up (more an issue when using fontdue).
Some significant changes are needed, at least to the way we choose fallback fonts and likely also to the way fonts are selected. This could either be via closer integration with system libraries or via closer adherence to CSS font selection (using the effective character map, and ... CSS recommends using the "system font fallback" mechanism as the next step).
Since #46 we use fontdb by @RazrFalcon plus some hacky lists of preferred family names to select fonts. This vaguely works but has several issues:
ttf_parser::Face::glyph_index
), for each missing glyph. This now has caching but is still slow with multiple fallback fonts.fontdue
).Some significant changes are needed, at least to the way we choose fallback fonts and likely also to the way fonts are selected. This could either be via closer integration with system libraries or via closer adherence to CSS font selection (using the effective character map, and ... CSS recommends using the "system font fallback" mechanism as the next step).
Also relevant: rust-fontconfig by @fschutt.
The text was updated successfully, but these errors were encountered: