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.
Sourcepub fn with_installed_faces(&self) -> Option<Self>
pub fn with_installed_faces(&self) -> Option<Self>
This set with the faces installed through
install_font_file after
its own, or None while no face was installed since it was built.
Installed faces only join the end, so every face keeps its index and a style resolves to the face it resolved to before; the installed faces cover the characters the set’s own faces lack.
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.