pub struct ResolvedTextScaleEntry {
pub size: f32,
pub weight: u16,
pub line_height: f32,
}Expand description
A single resolved text scale entry with guaranteed size, weight, and line height.
Phase 93-01 (G1): no Default derive. Constructed from a populated
TextScaleEntry during resolution; the missing-field sentinel is
written inline in
crate::resolve::validate_helpers::require_text_scale_entry (private).
Fields§
§size: f32Font size in logical pixels (converted from points during resolution
if font_dpi was set).
weight: u16CSS font weight (100-900).
line_height: f32Line height in logical pixels. Computed as defaults.line_height * size
when not explicitly set. Explicit values from presets are converted from
points to pixels along with sizes when font_dpi is set.
Trait Implementations§
Source§impl Clone for ResolvedTextScaleEntry
impl Clone for ResolvedTextScaleEntry
Source§fn clone(&self) -> ResolvedTextScaleEntry
fn clone(&self) -> ResolvedTextScaleEntry
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 ResolvedTextScaleEntry
impl Debug for ResolvedTextScaleEntry
Source§impl<'de> Deserialize<'de> for ResolvedTextScaleEntry
impl<'de> Deserialize<'de> for ResolvedTextScaleEntry
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 PartialEq for ResolvedTextScaleEntry
impl PartialEq for ResolvedTextScaleEntry
Source§fn eq(&self, other: &ResolvedTextScaleEntry) -> bool
fn eq(&self, other: &ResolvedTextScaleEntry) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ResolvedTextScaleEntry
impl Serialize for ResolvedTextScaleEntry
impl StructuralPartialEq for ResolvedTextScaleEntry
Auto Trait Implementations§
impl Freeze for ResolvedTextScaleEntry
impl RefUnwindSafe for ResolvedTextScaleEntry
impl Send for ResolvedTextScaleEntry
impl Sync for ResolvedTextScaleEntry
impl Unpin for ResolvedTextScaleEntry
impl UnsafeUnpin for ResolvedTextScaleEntry
impl UnwindSafe for ResolvedTextScaleEntry
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