pub(crate) struct FontCache {
pub(crate) fontdb: Arc<Database>,
pub(crate) resolved: HashMap<Font, Arc<ResolvedFont>>,
loaded: HashMap<ID, Option<LoadedFont>>,
}Fields§
§fontdb: Arc<Database>This fontdb is initialized from Options::fontdb and then
populated over the course of conversion.
resolved: HashMap<Font, Arc<ResolvedFont>>§loaded: HashMap<ID, Option<LoadedFont>>Implementations§
Source§impl FontCache
impl FontCache
pub(crate) fn new(fontdb: Arc<Database>) -> Self
pub(crate) fn load(&mut self, id: ID) -> Option<&mut LoadedFont>
pub(crate) fn outline( &mut self, id: ID, glyph: GlyphId, variations: impl IntoIterator<Item = FontVariation>, ) -> Option<Path>
pub(crate) fn colr( &mut self, id: ID, glyph: GlyphId, variations: impl IntoIterator<Item = FontVariation>, ) -> Option<Tree>
pub(crate) fn svg(&mut self, id: ID, glyph: GlyphId) -> Option<Node>
pub(crate) fn raster(&mut self, id: ID, glyph: GlyphId) -> Option<BitmapImage>
Auto Trait Implementations§
impl !RefUnwindSafe for FontCache
impl !UnwindSafe for FontCache
impl Freeze for FontCache
impl Send for FontCache
impl Sync for FontCache
impl Unpin for FontCache
impl UnsafeUnpin for FontCache
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more