Type Alias CoverageFormat1

Source
pub type CoverageFormat1<'a> = TableRef<'a, CoverageFormat1Marker>;
Expand description

Aliased Type§

pub struct CoverageFormat1<'a> {
    pub(crate) shape: CoverageFormat1Marker,
    pub(crate) data: FontData<'a>,
}

Fields§

§shape: CoverageFormat1Marker§data: FontData<'a>

Implementations§

Source§

impl<'a> CoverageFormat1<'a>

Source

pub fn coverage_format(&self) -> u16

Format identifier — format = 1

Source

pub fn glyph_count(&self) -> u16

Number of glyphs in the glyph array

Source

pub fn glyph_array(&self) -> &'a [BigEndian<GlyphId16>]

Array of glyph IDs — in numerical order

Source§

impl CoverageFormat1<'_>

Source

pub fn get(&self, gid: impl Into<GlyphId>) -> Option<u16>

If this glyph is in the coverage table, returns its index

Source

fn intersects(&self, glyphs: &IntSet<GlyphId>) -> bool

Returns if this table contains at least one glyph in the ‘glyphs’ set.

Source

fn intersect_set(&self, glyphs: &IntSet<GlyphId>) -> IntSet<GlyphId>

Returns the intersection of this table and input ‘glyphs’ set.

Source

pub fn population(&self) -> usize

Return the number of glyphs in this table

Source

pub fn cost(&self) -> u32

Return the cost of looking up a glyph in this table

Trait Implementations§

Source§

impl<'a> Debug for CoverageFormat1<'a>

Source§

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

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

impl<'a> FontRead<'a> for CoverageFormat1<'a>

Source§

fn read(data: FontData<'a>) -> Result<Self, ReadError>

Read an instance of Self from the provided data, performing validation. Read more
Source§

impl<'a> SomeTable<'a> for CoverageFormat1<'a>

Source§

fn type_name(&self) -> &str

The name of this table
Source§

fn get_field(&self, idx: usize) -> Option<Field<'a>>

Access this table’s fields, in declaration order.