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)
fn name(&self) -> &'static str
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
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.