pub struct FontMetricsTable {
pub units_per_em: u16,
pub ascender: i16,
pub descender: i16,
pub line_gap: i16,
pub cap_height: i16,
pub underline: Option<Rule>,
pub strikeout: Option<Rule>,
}Expand description
Font metrics in font units.
Ascender/descender/line gap follow the OS/2 typographic values when present, hhea otherwise. Descender is negative, per the tables.
Fields§
§units_per_em: u16Font design units per em; everything else here is in them.
ascender: i16Height above the baseline.
descender: i16Depth below the baseline, negative.
line_gap: i16Leading the face asks for between lines.
cap_height: i16Height of a capital above the baseline. Zero when the face declares none, which is what a drop cap has to fall back from.
underline: Option<Rule>Where the face puts an underline, from its post table.
None when the face declares none.
strikeout: Option<Rule>Where it puts a strikethrough, from its OS/2 table. None
when the face declares none.
Trait Implementations§
Source§impl Clone for FontMetricsTable
impl Clone for FontMetricsTable
Source§fn clone(&self) -> FontMetricsTable
fn clone(&self) -> FontMetricsTable
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for FontMetricsTable
Source§impl Debug for FontMetricsTable
impl Debug for FontMetricsTable
Source§impl PartialEq for FontMetricsTable
impl PartialEq for FontMetricsTable
Source§impl Serialize for FontMetricsTable
impl Serialize for FontMetricsTable
impl StructuralPartialEq for FontMetricsTable
Auto Trait Implementations§
impl Freeze for FontMetricsTable
impl RefUnwindSafe for FontMetricsTable
impl Send for FontMetricsTable
impl Sync for FontMetricsTable
impl Unpin for FontMetricsTable
impl UnsafeUnpin for FontMetricsTable
impl UnwindSafe for FontMetricsTable
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,
impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
§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.