Skip to main content

Dmap

Struct Dmap 

Source
pub struct Dmap(pub Cmap);
Expand description

Delta map table (table_D_M_A_P_): the same structure as cmap, whose mappings it takes precedence over.

Tuple Fields§

§0: Cmap

Trait Implementations§

Source§

impl Clone for Dmap

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Dmap

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Dmap

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl PartialEq for Dmap

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Dmap

Source§

impl Table for Dmap

Source§

fn remap_glyphs(&mut self, f: &mut dyn FnMut(u32) -> Result<u32>) -> Result<()>

Maps every glyph ID in the table with f, as when the glyph order changes (fontTools refers to glyphs by name, so this happens implicitly there). f fails for glyphs that no longer exist.
Source§

fn tag(&self) -> Tag

The table tag (tableTag).
Source§

fn compile(&mut self, font: &mut Font) -> Result<Vec<u8>>

Compiles the table to binary (compile).
Source§

fn clone_table(&self) -> Box<dyn Table>

A deep copy.
Source§

fn ensure_decompiled(&mut self)

Expands whatever was left compact when reading (ensureDecompiled).
Source§

fn is_raw(&self) -> bool

Whether this is a plain DefaultTable, which TTX marks as raw.
Source§

fn decompile_error(&self) -> Option<&str>

The error message, if decompilation failed and the table was kept as raw data (ERROR).
Source§

impl TableType for Dmap

Source§

const TAG: Tag

The tag of this table type.
Source§

fn decompile(data: &[u8], _font: &mut Font) -> Result<Self>

Parses the table (decompile).
Source§

const COMPANION: Option<Tag> = None

The tag of the beyond-64k companion that this type also implements, as GLYF for glyf. Font::get prefers it, as fontTools does with its "GLYF" if "GLYF" in font else "glyf".
Source§

fn decompile_as(tag: Tag, data: &[u8], font: &mut Font) -> Result<Self>

Parses the table under one of its tags.
Source§

fn new_as(tag: Tag) -> Self
where Self: Default,

An empty table with one of its tags (newTable).
Source§

impl TableXml for Dmap

Source§

fn to_xml(&self, writer: &mut XmlWriter, font: &mut Font) -> Result<()>

Writes the table’s TTX content, without the enclosing table element (toXML).
Source§

fn from_xml(&mut self, element: &Element, font: &mut Font) -> Result<()>

Reads one child element of the table’s TTX element (fromXML).

Auto Trait Implementations§

§

impl Forget for Dmap

§

impl Freeze for Dmap

§

impl Move for Dmap

§

impl RefUnwindSafe for Dmap

§

impl Send for Dmap
where RawVecInner: Send, Arc<BTreeMap<u32, u32>>: Send, NodeRef<Owned, u32, Vec<(u32, Option<u32>)>, LeafOrInternal>: Send, BoxRaw<(u32, Vec<(u32, Option<u32>)>)>: Send,

§

impl Sync for Dmap
where RawVecInner: Sync, Arc<BTreeMap<u32, u32>>: Sync, NodeRef<Owned, u32, Vec<(u32, Option<u32>)>, LeafOrInternal>: Sync, BoxRaw<(u32, Vec<(u32, Option<u32>)>)>: Sync,

§

impl Unpin for Dmap
where *const u8 is !null: Unpin, Arc<BTreeMap<u32, u32>>: Unpin, *const LeafNode<u32, Vec<(u32, Option<u32>)>> is !null: Unpin, Box<(u32, Vec<(u32, Option<u32>)>)>: Unpin,

§

impl UnsafeUnpin for Dmap

§

impl UnwindSafe for Dmap

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> AsAny for T
where T: Any,

Source§

fn as_any(&self) -> &(dyn Any + 'static)

self as &dyn Any.
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

self as &mut dyn Any.
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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.