TextMetrics
struct · ferroui-base · v0.5.0
struct TextMetrics
A metric that holds information about text specific measurements.
Members
font_rendering_em_sizebaselineascentdescentline_gapcap_heightline_heightunderline_thicknessunderline_positionstrikethrough_thicknessstrikethrough_positionnew
font_rendering_em_size
font_rendering_em_size: f64
Em size of font used to format and display text.
baseline
baseline: f64
Gets the recommended distance from the top of the text to the baseline.
ascent
ascent: f64
Gets the recommended distance above the baseline.
descent
descent: f64
Gets the recommended distance under the baseline.
line_gap
line_gap: f64
Gets the recommended additional space between two lines of text.
cap_height
cap_height: f64
The height of the capital letters above the baseline (positive; a FerroUI addition,
FontMetrics::cap_height).
line_height
line_height: f64
Gets the recommended line height.
underline_thickness
underline_thickness: f64
Gets a value that indicates the thickness of the underline.
underline_position
underline_position: f64
Gets a value that indicates the distance of the underline from the baseline.
strikethrough_thickness
strikethrough_thickness: f64
Gets a value that indicates the thickness of the strikethrough.
strikethrough_position
strikethrough_position: f64
Gets a value that indicates the distance of the strikethrough from the baseline.
new
fn new(glyph_typeface: &GlyphTypeface, font_rendering_em_size: f64) -> Self
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafePropertyValueAnyValueClassDefaultsBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>AnyToOwnedErasedDestructorIntoEitherCloneCopyDebugDefaultStructuralPartialEqPartialEq
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.