pub struct FontCache { /* private fields */ }Expand description
Loaded fonts shared across page extractions of one document, keyed by the font dictionary’s object reference.
The name→font binding is resource-scoped — /F1 in one form and /F1 in
the page resources may be different fonts — so names are never keys here.
The reference is: within a document (and its forks, which share the same
bytes) an object reference resolves to the same dictionary every time, and
loading that dictionary yields the same font. A font held as a direct
dictionary has no reference and is never cached here.
Send + Sync, so one cache may serve every worker of a parallel
page walk; the executor consults it at most once per page per distinct
font reference.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for FontCache
impl RefUnwindSafe for FontCache
impl Send for FontCache
impl Sync for FontCache
impl Unpin for FontCache
impl UnsafeUnpin for FontCache
impl UnwindSafe 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