Make FontSystem not self-referencing and update fontdb and rustybuzz#89
Make FontSystem not self-referencing and update fontdb and rustybuzz#89jackpot51 merged 5 commits intopop-os:mainfrom
FontSystem not self-referencing and update fontdb and rustybuzz#89Conversation
|
Just a heads up: before version 0.13.0, lookups in |
FontSystem not self-referencingFontSystem not self-referencing and update fontdb
|
Ok, I have updated the |
FontSystem not self-referencing and update fontdbFontSystem not self-referencing and update fontdb and rustybuzz
|
I fixed the duplicate |
|
I've added |
|
@geieredgar I merged this since CI tests were passing but it appears to have drastically reduced the performance of the editor-test example, so I reverted. Please see if you can replicate this issue. |
|
@jackpot51 Yes, I could replicate this issue. The reason is that |
|
Thanks for looking into this. If there was a way to do what the swash Font does it would be ideal. |
Make `FontSystem` not self-referencing and update `fontdb` and `rustybuzz`
This makes the
stdimplementation ofFontSystemnot self-referencing, which in turn allows defining adb_mutmethod for mutable access to the underlyingfontdb::Database(requested in #75).The high level changes are:
FontKeystruct that stores thefontdb::IDand (if theswashfeature is enabled) the swash key data(u32, swash::CacheKey).FontKeycan be obtained via the newFontSystem::get_font_key(id).FontKeys are cached instead of cachingFonts.FontSystem::get_fontnow takes aFontKeyinstead offontdb::IDand creates aFonton the fly, reusing the key data.FontMatches.FontSystem::get_font_matchesnow returns aArc<Vec<FontKey>>instead ofArc<FontMatches<'a>>.FontFallbackIterborrowsfontdb::Databaseand creates the font on the fly usingFont::from_key(db, key).