pub struct SoftwareTextFontSet { /* private fields */ }Implementations§
Source§impl SoftwareTextFontSet
impl SoftwareTextFontSet
pub fn empty() -> Self
pub fn from_font(font: SoftwareTextFont) -> Self
Sourcepub fn from_faces(fonts: Vec<SoftwareTextFont>) -> Self
pub fn from_faces(fonts: Vec<SoftwareTextFont>) -> Self
Build a set from already-parsed faces, keeping the default-face choice and the registered-family index in one place.
pub fn from_fonts_or_default(fonts: &[&'static [u8]]) -> Self
pub fn default_font(&self) -> Option<&SoftwareTextFont>
Sourcepub fn faces(&self) -> &[SoftwareTextFont]
pub fn faces(&self) -> &[SoftwareTextFont]
Every face in the set, in registration order.
Sourcepub fn has_registered_family(&self, family: &FontFamily) -> bool
pub fn has_registered_family(&self, family: &FontFamily) -> bool
Whether any face in the set was registered under family.
Sourcepub fn resolve(&self, style: &TextStyle) -> Option<&SoftwareTextFont>
pub fn resolve(&self, style: &TextStyle) -> Option<&SoftwareTextFont>
Resolves the family and style, then uses Compose’s directional CSS weight matching: lighter first below 400, heavier first above 500, and weights up to 500 before lighter or heavier alternatives in the 400–500 interval.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for SoftwareTextFontSet
impl !UnwindSafe for SoftwareTextFontSet
impl Freeze for SoftwareTextFontSet
impl Send for SoftwareTextFontSet
impl Sync for SoftwareTextFontSet
impl Unpin for SoftwareTextFontSet
impl UnsafeUnpin for SoftwareTextFontSet
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