mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-07-10 11:03:50 -04:00
font: cache top-level fonts
This greatly improves the performance when loading user-configured fallback fonts. Previously, we had to re-load these fallback fonts over and over again for each (new) glyph.
This commit is contained in:
parent
bf5ad13df0
commit
04edd96018
2 changed files with 65 additions and 2 deletions
2
font.h
2
font.h
|
|
@ -52,6 +52,8 @@ struct font {
|
|||
bool is_fallback;
|
||||
tll(char *) fallbacks;
|
||||
|
||||
size_t ref_counter;
|
||||
|
||||
/* Fields below are only valid for non-fallback fonts */
|
||||
FcPattern *fc_pattern;
|
||||
FcFontSet *fc_fonts;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue