pub struct FontMetrics {
pub id: String,
pub family: String,
pub version: String,
pub units_per_em: u32,
pub ascent: i32,
pub descent: i32,
pub line_gap: u32,
pub default_advance: u32,
pub wide_advance: u32,
pub wide_ranges: Vec<UnicodeRange>,
pub glyph_advances: BTreeMap<String, u32>,
pub provenance: Provenance,
}Expand description
One deterministic font measurement table.
Fields§
§id: StringCatalog-local metrics identifier.
family: StringDisplay family name.
version: StringUpstream or repository-authored metrics version.
units_per_em: u32Font design units per em.
ascent: i32Ascender in font design units.
descent: i32Descender in font design units.
line_gap: u32Additional line gap in font design units.
default_advance: u32Advance used for a scalar absent from glyph_advances.
wide_advance: u32Advance used for a scalar covered by wide_ranges.
wide_ranges: Vec<UnicodeRange>Ordered, non-overlapping Unicode scalar ranges treated as wide.
glyph_advances: BTreeMap<String, u32>Unicode scalar advances keyed as uppercase U+XXXX values.
provenance: ProvenanceSource, license, and distribution evidence for the metrics.
Trait Implementations§
Source§impl Clone for FontMetrics
impl Clone for FontMetrics
Source§fn clone(&self) -> FontMetrics
fn clone(&self) -> FontMetrics
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 moreSource§impl Debug for FontMetrics
impl Debug for FontMetrics
Source§impl<'de> Deserialize<'de> for FontMetrics
impl<'de> Deserialize<'de> for FontMetrics
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
impl Eq for FontMetrics
Source§impl PartialEq for FontMetrics
impl PartialEq for FontMetrics
Source§impl Serialize for FontMetrics
impl Serialize for FontMetrics
impl StructuralPartialEq for FontMetrics
Auto Trait Implementations§
impl Freeze for FontMetrics
impl RefUnwindSafe for FontMetrics
impl Send for FontMetrics
impl Sync for FontMetrics
impl Unpin for FontMetrics
impl UnsafeUnpin for FontMetrics
impl UnwindSafe for FontMetrics
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