Skip to main content

BitmapLocator

Struct BitmapLocator 

Source
pub struct BitmapLocator<const COLOR: bool, const APPLE: bool = false> {
    pub version: f64,
    pub strikes: Vec<Option<Strike>>,
}
Expand description

Embedded (COLOR false) or Color (COLOR true) Bitmap Location table (table_E_B_L_C_, table_C_B_L_C_), or with APPLE, Apple’s bloc (table__b_l_o_c).

See https://learn.microsoft.com/en-us/typography/opentype/spec/eblc and https://learn.microsoft.com/en-us/typography/opentype/spec/cblc.

Fields§

§version: f64

The table version.

§strikes: Vec<Option<Strike>>

The strikes. Only a TTX document with gaps in its strike indices leaves Nones, which fail when the table is compiled or dumped.

Trait Implementations§

Source§

impl<const COLOR: bool, const APPLE: bool> Clone for BitmapLocator<COLOR, APPLE>

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<const COLOR: bool, const APPLE: bool> Debug for BitmapLocator<COLOR, APPLE>

Source§

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

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

impl<const COLOR: bool, const APPLE: bool> Default for BitmapLocator<COLOR, APPLE>

Source§

fn default() -> Self

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

impl<const COLOR: bool, const APPLE: bool> PartialEq for BitmapLocator<COLOR, APPLE>

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<const COLOR: bool, const APPLE: bool> StructuralPartialEq for BitmapLocator<COLOR, APPLE>

Source§

impl<const COLOR: bool, const APPLE: bool> Table for BitmapLocator<COLOR, APPLE>

Source§

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

The first and last glyph are recalculated when compiling.

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<const COLOR: bool, const APPLE: bool> TableType for BitmapLocator<COLOR, APPLE>

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<const COLOR: bool, const APPLE: bool> TableXml for BitmapLocator<COLOR, APPLE>

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<const COLOR: bool, const APPLE: bool> Forget for BitmapLocator<COLOR, APPLE>

§

impl<const COLOR: bool, const APPLE: bool> Freeze for BitmapLocator<COLOR, APPLE>

§

impl<const COLOR: bool, const APPLE: bool> Move for BitmapLocator<COLOR, APPLE>

§

impl<const COLOR: bool, const APPLE: bool> RefUnwindSafe for BitmapLocator<COLOR, APPLE>

§

impl<const COLOR: bool, const APPLE: bool> Send for BitmapLocator<COLOR, APPLE>
where RawVecInner: Send,

§

impl<const COLOR: bool, const APPLE: bool> Sync for BitmapLocator<COLOR, APPLE>
where RawVecInner: Sync,

§

impl<const COLOR: bool, const APPLE: bool> Unpin for BitmapLocator<COLOR, APPLE>
where *const u8 is !null: Unpin,

§

impl<const COLOR: bool, const APPLE: bool> UnsafeUnpin for BitmapLocator<COLOR, APPLE>

§

impl<const COLOR: bool, const APPLE: bool> UnwindSafe for BitmapLocator<COLOR, APPLE>
where RawVecInner: UnwindSafe,

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.