pub struct TypeScale {
pub typeface: TypefaceRole,
pub font_family: &'static str,
pub font_size: Rems,
pub line_height: Rems,
pub letter_spacing: Rems,
pub font_weight: u16,
}Expand description
Reference typography metrics at 100% text scale.
Sizes and tracking are in rems so they follow the application’s text scale.
letter_spacing records the reference value; GPUI 0.3.10 does not expose
tracking in its text style, so storing it does not apply it to rendered text.
Fields§
§typeface: TypefaceRole§font_family: &'static strDefault family; applications can resolve typeface to a custom family.
font_size: Rems§line_height: Rems§letter_spacing: Rems§font_weight: u16Trait Implementations§
impl Copy for TypeScale
impl StructuralPartialEq for TypeScale
Auto Trait Implementations§
impl Freeze for TypeScale
impl RefUnwindSafe for TypeScale
impl Send for TypeScale
impl Sync for TypeScale
impl Unpin for TypeScale
impl UnsafeUnpin for TypeScale
impl UnwindSafe for TypeScale
Blanket Implementations§
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more