read_fonts::tables::hhea

Type Alias Hhea

source
pub type Hhea<'a> = TableRef<'a, HheaMarker>;
Expand description

hhea Horizontal Header Table

Aliased Type§

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

Implementations§

source§

impl<'a> Hhea<'a>

source

pub fn version(&self) -> MajorMinor

The major/minor version (1, 0)

source

pub fn ascender(&self) -> FWord

Typographic ascent.

source

pub fn descender(&self) -> FWord

Typographic descent.

source

pub fn line_gap(&self) -> FWord

Typographic line gap. Negative LineGap values are treated as zero in some legacy platform implementations.

source

pub fn advance_width_max(&self) -> UfWord

Maximum advance width value in ‘hmtx’ table.

source

pub fn min_left_side_bearing(&self) -> FWord

Minimum left sidebearing value in ‘hmtx’ table for glyphs with contours (empty glyphs should be ignored).

source

pub fn min_right_side_bearing(&self) -> FWord

Minimum right sidebearing value; calculated as min(aw - (lsb + xMax - xMin)) for glyphs with contours (empty glyphs should be ignored).

source

pub fn x_max_extent(&self) -> FWord

Max(lsb + (xMax-xMin))

source

pub fn caret_slope_rise(&self) -> i16

Used to calculate the slope of the cursor (rise/run); 1 for vertical caret, 0 for horizontal.

source

pub fn caret_slope_run(&self) -> i16

0 for vertical caret, 1 for horizontal.

source

pub fn caret_offset(&self) -> i16

The amount by which a slanted highlight on a glyph needs to be shifted to produce the best appearance. Set to 0 for non-slanted fonts

source

pub fn metric_data_format(&self) -> i16

0 for current format.

source

pub fn number_of_long_metrics(&self) -> u16

Number of LongMetric entries in ‘hmtx’/‘vmtx’ table

Trait Implementations§

source§

impl<'a> Debug for Hhea<'a>

source§

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

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

impl<'a> FontRead<'a> for Hhea<'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 Hhea<'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 Hhea<'_>

source§

const TAG: Tag = _

hhea