Skip to main content

UncompileContext

Struct UncompileContext 

Source
pub struct UncompileContext<'a> {
    pub lookups: IndexMap<SmolStr, LookupBlock>,
    pub lookup_map: HashMap<(String, u16), SmolStr>,
    pub language_systems: IndexMap<Tag, IndexSet<Tag>>,
    pub unnamed_anchors: IndexMap<SmolStr, Vec<Anchor>>,
    pub anchors: IndexMap<SmolStr, IndexMap<SmolStr, Anchor>>,
    pub mark_classes: IndexMap<SmolStr, Vec<MarkClassDefinition>>,
    pub named_classes: IndexMap<SmolStr, GlyphClass>,
    pub features: IndexMap<SmolStr, Vec<LookupReferenceStatement>>,
    /* private fields */
}
Expand description

The context object that holds all the information we need when uncompiling a font.

Fields§

§lookups: IndexMap<SmolStr, LookupBlock>

All the lookups we have uncompiled so far, keyed by their name.

§lookup_map: HashMap<(String, u16), SmolStr>

A mapping from (“sub”|“pos”, lookup_list_index) to the name of the lookup block we created for it. This is used to generate the correct lookup names in contextual lookups.

§language_systems: IndexMap<Tag, IndexSet<Tag>>

A mapping from script tags to the language system tags that are present in the font.

§unnamed_anchors: IndexMap<SmolStr, Vec<Anchor>>

Anchors on a glyph which we haven’t worked out what they should be called. class -> glyphname -> anchor

§anchors: IndexMap<SmolStr, IndexMap<SmolStr, Anchor>>

Anchors on a glyph which we have worked out what they should be called.

§mark_classes: IndexMap<SmolStr, Vec<MarkClassDefinition>>

Mark classes, indexed by class name.

§named_classes: IndexMap<SmolStr, GlyphClass>

Named glyph classes, indexed by class name.

§features: IndexMap<SmolStr, Vec<LookupReferenceStatement>>

Features, indexed by feature name.

Implementations§

Auto Trait Implementations§

§

impl<'a> Freeze for UncompileContext<'a>

§

impl<'a> RefUnwindSafe for UncompileContext<'a>

§

impl<'a> Send for UncompileContext<'a>

§

impl<'a> Sync for UncompileContext<'a>

§

impl<'a> Unpin for UncompileContext<'a>

§

impl<'a> UnsafeUnpin for UncompileContext<'a>

§

impl<'a> UnwindSafe for UncompileContext<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<U, T> ToOwnedObj<U> for T
where U: FromObjRef<T>,

Source§

fn to_owned_obj(&self, data: FontData<'_>) -> U

Convert this type into T, using the provided data to resolve any offsets.
Source§

impl<U, T> ToOwnedTable<U> for T
where U: FromTableRef<T>,

Source§

fn to_owned_table(&self) -> U

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.