mirror of
https://github.com/Myriad-Dreamin/tinymist.git
synced 2025-08-03 17:58:17 +00:00
![]() * fix: remove unnecessary &mut in FontResolverImpl::append_font() * refactor: better readablity in FontResolverImpl::rebuild() * feat: FontResovlerImpl::clone_and_rebuild() Change FontSlot to store Arc to QueryRef<Font, FontLoader>, so we can clone FontSlot and share the cached loaded font between different slots. Since CompilerUniverse only holds a immutable Arc to FontResovlerImpl, adding clone_and_rebuild method allow us to append and rebuild without mutable access to FontResovlerImpl. * refactor: remove partial_book and modify methods from FontResolverImpl partial_book is removed from FontResolverImpl, all the modifying methods are also removed. new method get_fonts and new_with_fonts are added. If you want to modify fonts, you can get all fonts and modify them, then call new_with_fonts to create a new FontResolverImpl. * refactor: SystemFontSearch, BrowserFontSearch - Both font searcher now is just a wrapper for Vec<(FontInfo, FontSlot)>, typst::FontBook will be built when converting into FontResolverImpl. - Provide a method with_fonts_mut() so user can get a direct mutable access to the under lying fonts vector to do any changes. - Support searcher -> resolver and resolver -> searcher conversion. * refactor: api change to biulder pattern Method new_with_resolver() is added since CompilerUniverse only holds Arc reference to resolver, and we can't move it out. * fix: add fontdb::Database to SystemFontSearcher Store fonts info in db, load them in bulk when calling flush() * chore: merge `FontResolverImpl` and `TinymistFontResolver` * feat: remove font profile feature * feat: remove project font * docs: comment the font resolver trait * docs: comment the font slot struct * docs: comment the crate * test: move system tests * dev: clean resolver * dev: clean searchers * dev: clean par iters * feat: enrich memory font resolver * todo: useless reuse * dev: remove reuse api * dev: build font book in `fn build` * fix: make clippy happy * fix: bad use --------- Co-authored-by: c0per <60544162+c0per@users.noreply.github.com> |
||
---|---|---|
.. | ||
crityp | ||
sync-lsp | ||
tinymist | ||
tinymist-analysis | ||
tinymist-assets | ||
tinymist-core | ||
tinymist-dap | ||
tinymist-debug | ||
tinymist-derive | ||
tinymist-l10n | ||
tinymist-lint | ||
tinymist-project | ||
tinymist-query | ||
tinymist-render | ||
tinymist-std | ||
tinymist-task | ||
tinymist-vfs | ||
tinymist-world | ||
typlite | ||
typst-preview | ||
typst-shim |