pub enum FormFontsKey {
Form(ObjRef),
None,
DirectResources(ObjRef),
Direct,
}Expand description
Which interactive form a set of cached form faces belongs to.
§What the faces actually depend on
Not the /AcroForm dictionary: the /DR /Font dictionary inside it,
and nothing else. Everything FormFonts builds is either a face named
there or one of two constants — the fallback Helvetica and the second
face a substitutable charset needs, both from dictionaries written in the
source. So that is what the key names, and a form declaring no /DR /Font has faces indistinguishable from a document with no form at all.
§The four cases
- an indirect
/AcroForm, which is what a real form is written as. The reference is the document-scoped identity every other cache onBuildContextkeys on, so the faces are cached under it. - no
/DR /Fontto load from — no/AcroForm, or one that declares no default resources. The faces then depend on nothing from the document, so one slot serves every such document a context is threaded through. This isNone, and it is the common case: most documents have no form, and an empty<</Fields[]>>written directly into the catalog is common enough that six of this corpus’s 44 files carry one. - a direct
/AcroFormwhose/DR /Fontis a reference, which is the ordinary spelling of an unusual one. The font dictionary’s reference is as good an identity as the form’s own would have been, so it is cached under that instead. - a direct
/AcroFormwith a direct/DR /Font, which is legal and genuinely rare. There is no reference anywhere to key on and the content is document-specific, so it is not cached.
Variants§
Form(ObjRef)
The /AcroForm the given object holds.
None
No /DR /Font for the faces to depend on.
DirectResources(ObjRef)
A direct /AcroForm whose /DR /Font is the given object.
Direct
A direct /AcroForm with a direct /DR /Font.
Trait Implementations§
Source§impl Clone for FormFontsKey
impl Clone for FormFontsKey
Source§fn clone(&self) -> FormFontsKey
fn clone(&self) -> FormFontsKey
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for FormFontsKey
Source§impl Debug for FormFontsKey
impl Debug for FormFontsKey
impl Eq for FormFontsKey
Source§impl Hash for FormFontsKey
impl Hash for FormFontsKey
Source§impl PartialEq for FormFontsKey
impl PartialEq for FormFontsKey
impl StructuralPartialEq for FormFontsKey
Auto Trait Implementations§
impl Freeze for FormFontsKey
impl RefUnwindSafe for FormFontsKey
impl Send for FormFontsKey
impl Sync for FormFontsKey
impl Unpin for FormFontsKey
impl UnsafeUnpin for FormFontsKey
impl UnwindSafe for FormFontsKey
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