pub struct TextSystem { /* private fields */ }Expand description
Owns fonts and performs shaping-related lookups and rasterization.
One TextSystem is shared by all windows of an application.
Implementations§
Source§impl TextSystem
impl TextSystem
Sourcepub fn mono_family(&self) -> &str
pub fn mono_family(&self) -> &str
The platform monospace family, used for the generic
MONOSPACE family name.
Sourcepub fn resolve_family<'a>(&'a self, family: Option<&'a str>) -> &'a str
pub fn resolve_family<'a>(&'a self, family: Option<&'a str>) -> &'a str
Resolves generic family names ("monospace") to installed families.
Sourcepub fn set_ui_family(&mut self, family: impl Into<String>)
pub fn set_ui_family(&mut self, family: impl Into<String>)
Overrides the default UI family.
pub fn has_family(&self, name: &str) -> bool
pub fn face_count(&self) -> usize
Sourcepub fn rasterize(&mut self, key: GlyphKey) -> Option<RasterizedGlyph>
pub fn rasterize(&mut self, key: GlyphKey) -> Option<RasterizedGlyph>
Rasterizes a glyph. Returns None for empty glyphs (e.g. spaces).
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for TextSystem
impl !RefUnwindSafe for TextSystem
impl !UnwindSafe for TextSystem
impl Send for TextSystem
impl Sync for TextSystem
impl Unpin for TextSystem
impl UnsafeUnpin for TextSystem
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