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: FWord
Typographic ascent.
descender: FWord
Typographic descent.
line_gap: FWord
Typographic line gap. Negative LineGap values are treated as zero in some legacy platform implementations.
advance_height_max: UfWord
Maximum advance height value in ‘vmtx’ table.
min_top_side_bearing: FWord
Minimum top sidebearing value in ‘vmtx’ table for glyphs with contours (empty glyphs should be ignored).
min_bottom_side_bearing: FWord
Minimum bottom sidebearing value
y_max_extent: FWord
Defined as max( tsb + (yMax-yMin)).
caret_slope_rise: i16
Used to calculate the slope of the cursor (rise/run); 1 for vertical caret, 0 for horizontal.
caret_slope_run: i16
0 for vertical caret, 1 for horizontal.
caret_offset: 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
number_of_long_ver_metrics: u16
Number of advance heights in the vertical metrics (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<'de> Deserialize<'de> for Vhea
impl<'de> Deserialize<'de> for Vhea
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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.
Source§fn table_type(&self) -> TableType
fn table_type(&self) -> TableType
The type of this table. Read more
Source§impl Ord for Vhea
impl Ord for Vhea
Source§impl PartialOrd for Vhea
impl PartialOrd for Vhea
Source§impl Validate for Vhea
impl Validate for Vhea
Source§fn validate_impl(&self, _ctx: &mut ValidationCtx)
fn validate_impl(&self, _ctx: &mut ValidationCtx)
Validate this table. Read more
impl Eq for Vhea
impl StructuralPartialEq for Vhea
Auto Trait Implementations§
impl Freeze for Vhea
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
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
Convert this type into
T
, using the provided data to resolve any offsets.