pub(super) struct CachedFamily {
pub fonts: Vec<FontFaceKey>,
pub characters: Option<BTreeMap<char, Vec<String>>>,
pub replacement_glyph: (FontFaceKey, GlyphInfo),
pub glyph_info_cache: HashMap<char, (FontFaceKey, GlyphInfo)>,
}Expand description
Cached data for working with a font family (e.g. doing character lookups).
Fields§
§fonts: Vec<FontFaceKey>§characters: Option<BTreeMap<char, Vec<String>>>Lazily calculated.
replacement_glyph: (FontFaceKey, GlyphInfo)§glyph_info_cache: HashMap<char, (FontFaceKey, GlyphInfo)>Implementations§
Source§impl CachedFamily
impl CachedFamily
fn new( fonts: Vec<FontFaceKey>, fonts_by_id: &mut IntMap<FontFaceKey, FontImpl>, ) -> Self
pub(crate) fn glyph_info_no_cache_or_fallback( &mut self, c: char, fonts_by_id: &mut IntMap<FontFaceKey, FontImpl>, ) -> Option<(FontFaceKey, GlyphInfo)>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CachedFamily
impl RefUnwindSafe for CachedFamily
impl Send for CachedFamily
impl Sync for CachedFamily
impl Unpin for CachedFamily
impl UnwindSafe for CachedFamily
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