Struct write_fonts::tables::vhea::Vhea
source · pub struct Vhea {
pub ascender: FWord,
pub descender: FWord,
pub line_gap: FWord,
pub advance_height_max: UfWord,
pub min_top_side_bearing: FWord,
pub min_bottom_side_bearing: FWord,
pub y_max_extent: FWord,
pub caret_slope_rise: i16,
pub caret_slope_run: i16,
pub caret_offset: i16,
pub number_of_long_ver_metrics: u16,
}Expand description
The vhea Vertical 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_height_max: UfWordMaximum advance height value in ‘vmtx’ table.
min_top_side_bearing: FWordMinimum top sidebearing value in ‘vmtx’ table for glyphs with contours (empty glyphs should be ignored).
min_bottom_side_bearing: FWordMinimum bottom sidebearing value
y_max_extent: FWordDefined as max( tsb + (yMax-yMin)).
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_ver_metrics: u16Number of LongMetric entries in ‘hmtx’/‘vmtx’ table
Implementations§
source§impl Vhea
impl Vhea
sourcepub fn new(
ascender: FWord,
descender: FWord,
line_gap: FWord,
advance_height_max: UfWord,
min_top_side_bearing: FWord,
min_bottom_side_bearing: FWord,
y_max_extent: FWord,
caret_slope_rise: i16,
caret_slope_run: i16,
caret_offset: i16,
number_of_long_ver_metrics: u16
) -> Self
pub fn new( ascender: FWord, descender: FWord, line_gap: FWord, advance_height_max: UfWord, min_top_side_bearing: FWord, min_bottom_side_bearing: FWord, y_max_extent: FWord, caret_slope_rise: i16, caret_slope_run: i16, caret_offset: i16, number_of_long_ver_metrics: u16 ) -> Self
Construct a new Vhea
Trait Implementations§
source§impl FontWrite for Vhea
impl FontWrite for Vhea
source§fn write_into(&self, writer: &mut TableWriter)
fn write_into(&self, writer: &mut TableWriter)
Write our data and information about offsets into this TableWriter.
Auto Trait Implementations§
impl RefUnwindSafe for Vhea
impl Send for Vhea
impl Sync for Vhea
impl Unpin for Vhea
impl UnwindSafe for Vhea
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
Mutably borrows from an owned value. Read more
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
Convert this type into
T, using the provided data to resolve any offsets.