Struct write_fonts::tables::hhea::Hhea
source · pub struct Hhea {
pub ascender: FWord,
pub descender: FWord,
pub line_gap: FWord,
pub advance_width_max: UfWord,
pub min_left_side_bearing: FWord,
pub min_right_side_bearing: FWord,
pub x_max_extent: FWord,
pub caret_slope_rise: i16,
pub caret_slope_run: i16,
pub caret_offset: i16,
pub number_of_long_metrics: u16,
}Expand description
hhea Horizontal Header Table
Fields§
§ascender: FWordTypographic ascent.
descender: FWordTypographic descent.
line_gap: FWordTypographic line gap. Negative LineGap values are treated as zero in some legacy platform implementations.
advance_width_max: UfWordMaximum advance width value in ‘hmtx’ table.
min_left_side_bearing: FWordMinimum left sidebearing value in ‘hmtx’ table for glyphs with contours (empty glyphs should be ignored).
min_right_side_bearing: FWordMinimum right sidebearing value; calculated as min(aw - (lsb + xMax - xMin)) for glyphs with contours (empty glyphs should be ignored).
x_max_extent: FWordMax(lsb + (xMax-xMin))
caret_slope_rise: i16Used to calculate the slope of the cursor (rise/run); 1 for vertical caret, 0 for horizontal.
caret_slope_run: i160 for vertical caret, 1 for horizontal.
caret_offset: i16The 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
number_of_long_metrics: u16Number of LongMetric entries in ‘hmtx’/‘vmtx’ table
Implementations§
source§impl Hhea
impl Hhea
sourcepub fn new(
ascender: FWord,
descender: FWord,
line_gap: FWord,
advance_width_max: UfWord,
min_left_side_bearing: FWord,
min_right_side_bearing: FWord,
x_max_extent: FWord,
caret_slope_rise: i16,
caret_slope_run: i16,
caret_offset: i16,
number_of_long_metrics: u16
) -> Self
pub fn new( ascender: FWord, descender: FWord, line_gap: FWord, advance_width_max: UfWord, min_left_side_bearing: FWord, min_right_side_bearing: FWord, x_max_extent: FWord, caret_slope_rise: i16, caret_slope_run: i16, caret_offset: i16, number_of_long_metrics: u16 ) -> Self
Construct a new Hhea
Trait Implementations§
source§impl FontWrite for Hhea
impl FontWrite for Hhea
source§fn write_into(&self, writer: &mut TableWriter)
fn write_into(&self, writer: &mut TableWriter)
source§fn table_type(&self) -> TableType
fn table_type(&self) -> TableType
source§impl Ord for Hhea
impl Ord for Hhea
source§impl PartialEq for Hhea
impl PartialEq for Hhea
source§impl PartialOrd for Hhea
impl PartialOrd for Hhea
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self and other) and is used by the <=
operator. Read moresource§impl Validate for Hhea
impl Validate for Hhea
source§fn validate_impl(&self, _ctx: &mut ValidationCtx)
fn validate_impl(&self, _ctx: &mut ValidationCtx)
impl Eq for Hhea
impl StructuralEq for Hhea
impl StructuralPartialEq for Hhea
Auto Trait Implementations§
impl RefUnwindSafe for Hhea
impl Send for Hhea
impl Sync for Hhea
impl Unpin for Hhea
impl UnwindSafe for Hhea
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.source§impl<'a, T> FontReadWithArgs<'a> for Twhere
T: FontRead<'a>,
impl<'a, T> FontReadWithArgs<'a> for Twhere
T: FontRead<'a>,
source§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
source§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
T, using the provided data to resolve any offsets.