pub struct Font { /* private fields */ }Implementations§
Source§impl Font
impl Font
Sourcepub fn load(res: &Resources, font_id: &str) -> Arc<Font> ⓘ
pub fn load(res: &Resources, font_id: &str) -> Arc<Font> ⓘ
font_id like yog:font/uniform (Yog’s alias of a game font) or
one of the mod’s own (mymod:font/fancy); "" is the default font.
Sourcepub fn chars(&self, unihex: bool) -> Vec<char>
pub fn chars(&self, unihex: bool) -> Vec<char>
The characters its providers draw, in order; Unifont’s (tens of
thousands) only when unihex.
Sourcepub fn is_real(&self) -> bool
pub fn is_real(&self) -> bool
Whether any glyph source was found (else everything is the missing box).
pub fn glyph(&self, ch: char) -> Arc<Glyph> ⓘ
Auto Trait Implementations§
impl !Freeze for Font
impl RefUnwindSafe for Font
impl Send for Font
impl Sync for Font
impl Unpin for Font
impl UnsafeUnpin for Font
impl UnwindSafe for Font
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