pub struct GlyphCache {
pub by_name: FxHashMap<NameId, CachedGlyph>,
pub by_cid: FxHashMap<i32, CachedGlyph>,
pub by_gid: FxHashMap<u16, CachedGlyph>,
pub by_charcode: FxHashMap<u8, CachedType3Glyph>,
pub by_type3_name: FxHashMap<NameId, CachedType3Glyph>,
}Expand description
Per-font glyph path cache.
Fields§
§by_name: FxHashMap<NameId, CachedGlyph>Type 1 and CFF glyphs keyed by glyph name.
by_cid: FxHashMap<i32, CachedGlyph>CIDFont glyphs keyed by CID.
by_gid: FxHashMap<u16, CachedGlyph>TrueType glyphs keyed by glyph ID.
by_charcode: FxHashMap<u8, CachedType3Glyph>Type 3 glyphs keyed by char code (only setcachedevice glyphs).
by_type3_name: FxHashMap<NameId, CachedType3Glyph>Type 3 glyphs keyed by glyph name (only setcachedevice glyphs).
Separate from Self::by_charcode because glyphshow bypasses the
font’s Encoding and can therefore name a glyph that no character code
maps to — such a glyph has no code to key on.
Implementations§
Source§impl GlyphCache
impl GlyphCache
Trait Implementations§
Source§impl Default for GlyphCache
impl Default for GlyphCache
Source§fn default() -> GlyphCache
fn default() -> GlyphCache
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for GlyphCache
impl RefUnwindSafe for GlyphCache
impl Send for GlyphCache
impl Sync for GlyphCache
impl Unpin for GlyphCache
impl UnsafeUnpin for GlyphCache
impl UnwindSafe for GlyphCache
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