pub struct ResolvedFontSpec {
pub family: Arc<str>,
pub size: f32,
pub weight: u16,
pub style: FontStyle,
pub color: Rgba,
}Expand description
A resolved (non-optional) font specification produced after theme resolution.
Unlike FontSpec, all fields are required (non-optional)
because resolution has already filled in all defaults.
Phase 93-01 (G1): no Default derive. ResolvedFontSpec is always
constructed from a fully populated unresolved source; any “zero”
instance is a placeholder sentinel built manually (see
resolve::validate_helpers::resolved_font_spec_sentinel).
Fields§
§family: Arc<str>Font family name.
size: f32Font size in logical pixels. Converted from platform points during
resolution if font_dpi was set on the source ThemeDefaults.
weight: u16CSS font weight (100–900).
style: FontStyleFont style (normal, italic, oblique).
color: RgbaFont color.
Trait Implementations§
Source§impl Clone for ResolvedFontSpec
impl Clone for ResolvedFontSpec
Source§fn clone(&self) -> ResolvedFontSpec
fn clone(&self) -> ResolvedFontSpec
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 ResolvedFontSpec
impl Debug for ResolvedFontSpec
Source§impl<'de> Deserialize<'de> for ResolvedFontSpec
impl<'de> Deserialize<'de> for ResolvedFontSpec
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 ResolvedFontSpec
impl PartialEq for ResolvedFontSpec
Source§fn eq(&self, other: &ResolvedFontSpec) -> bool
fn eq(&self, other: &ResolvedFontSpec) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ResolvedFontSpec
impl Serialize for ResolvedFontSpec
impl StructuralPartialEq for ResolvedFontSpec
Auto Trait Implementations§
impl Freeze for ResolvedFontSpec
impl RefUnwindSafe for ResolvedFontSpec
impl Send for ResolvedFontSpec
impl Sync for ResolvedFontSpec
impl Unpin for ResolvedFontSpec
impl UnsafeUnpin for ResolvedFontSpec
impl UnwindSafe for ResolvedFontSpec
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