pub struct ShellTypography {
pub font: Font,
pub size: f32,
}Expand description
Client-frame typography in logical pixels, before the shell text scale. Application content retains its own typography. Font availability and glyph fallback are handled by GPUI’s text system; a requested family is not proof that the family is installed.
Fields§
§font: Font§size: f32Logical pixel size; normalized to 8–48 before text scaling.
Implementations§
Source§impl ShellTypography
impl ShellTypography
Sourcepub fn from_desktop_description(description: &str) -> Option<Self>
pub fn from_desktop_description(description: &str) -> Option<Self>
Parse the common desktop family/size/weight/style subset of GNOME Pango
descriptions or KDE QFont serialization. Points use 96/72 logical pixels;
explicit px is already logical pixels. This never applies device DPI.
Advanced Pango variations/features/stretch are not supported. QFont’s
additional attributes (underline, stretch, features, etc.) are not applied.
Invalid or unsupported descriptions return None, allowing a safe fallback.
Trait Implementations§
Source§impl Clone for ShellTypography
impl Clone for ShellTypography
Source§impl Debug for ShellTypography
impl Debug for ShellTypography
Source§impl Default for ShellTypography
impl Default for ShellTypography
Source§impl PartialEq for ShellTypography
impl PartialEq for ShellTypography
impl StructuralPartialEq for ShellTypography
Auto Trait Implementations§
impl Forget for ShellTypography
impl Freeze for ShellTypography
impl RefUnwindSafe for ShellTypography
impl Send for ShellTypography
impl Sync for ShellTypography
impl Unpin for ShellTypography
impl UnsafeUnpin for ShellTypography
impl UnwindSafe for ShellTypography
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
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,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> 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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().