pub struct StyledMetrics {
pub pixels_per_point: f32,
pub px_scale_factor: f32,
pub scale: f32,
pub y_offset_in_points: f32,
pub ascent: f32,
pub row_height: f32,
pub location: Location,
}Expand description
Metrics for a font at a specific screen-space scale.
Fields§
§pixels_per_point: f32The DPI part of the screen-space scale.
px_scale_factor: f32Scale factor, relative to the font’s units per em (so, probably much less than 1).
Translates “unscaled” units to physical (screen) pixels.
scale: f32Absolute scale in screen pixels, for skrifa.
y_offset_in_points: f32Vertical offset, in UI points (not screen-space).
ascent: f32This is the distance from the top to the baseline.
Unit: points.
row_height: f32Height of one row of text in points.
Returns a value rounded to emath::GUI_ROUNDING.
location: LocationResolved variation coordinates.
Trait Implementations§
Source§impl Clone for StyledMetrics
impl Clone for StyledMetrics
Source§fn clone(&self) -> StyledMetrics
fn clone(&self) -> StyledMetrics
Returns a duplicate of the value. Read more
1.0.0 · 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 StyledMetrics
impl Debug for StyledMetrics
Source§impl Default for StyledMetrics
impl Default for StyledMetrics
Source§fn default() -> StyledMetrics
fn default() -> StyledMetrics
Returns the “default value” for a type. Read more
Source§impl PartialEq for StyledMetrics
impl PartialEq for StyledMetrics
impl StructuralPartialEq for StyledMetrics
Auto Trait Implementations§
impl Freeze for StyledMetrics
impl RefUnwindSafe for StyledMetrics
impl Send for StyledMetrics
impl Sync for StyledMetrics
impl Unpin for StyledMetrics
impl UnwindSafe for StyledMetrics
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