Type Alias read_fonts::tables::vmtx::Vmtx

source ·
pub type Vmtx<'a> = TableRef<'a, VmtxMarker>;
Expand description

Aliased Type§

struct Vmtx<'a> { /* private fields */ }

Implementations§

source§

impl<'a> Vmtx<'a>

source

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

A constructor that requires additional arguments.

This type requires some external state in order to be parsed.

source§

impl<'a> Vmtx<'a>

source

pub fn v_metrics(&self) -> &'a [LongMetric]

Paired advance height and top side bearing values for each glyph. Records are indexed by glyph ID.

source

pub fn top_side_bearings(&self) -> &'a [BigEndian<i16>]

Top side bearings for glyph IDs greater than or equal to numberOfLongMetrics.

source§

impl<'a> Vmtx<'a>

source

pub fn advance(&self, glyph_id: GlyphId) -> Option<u16>

Returns the advance height for the given glyph identifier.

source

pub fn side_bearing(&self, glyph_id: GlyphId) -> Option<i16>

Returns the top side bearing for the given glyph identifier.

Trait Implementations§

source§

impl<'a> Debug for Vmtx<'a>

source§

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

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

impl<'a> FontReadWithArgs<'a> for Vmtx<'a>

source§

fn read_with_args( data: FontData<'a>, args: &(u16, u16), ) -> Result<Self, ReadError>

read an item, using the provided args. Read more
source§

impl ReadArgs for Vmtx<'_>

source§

type Args = (u16, u16)

source§

impl<'a> SomeTable<'a> for Vmtx<'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.
source§

impl TopLevelTable for Vmtx<'_>

source§

const TAG: Tag = _

vmtx