pub struct Fonts { /* private fields */ }Expand description
the fonts of a scene (or of anyone laying out text: the CPU path of G6e)
Implementations§
Source§impl Fonts
impl Fonts
pub fn new() -> Fonts
Sourcepub fn add(&mut self, data: &[u8], face: u32) -> Result<FontId>
pub fn add(&mut self, data: &[u8], face: u32) -> Result<FontId>
a font from TrueType or OpenType bytes (face: the font of a collection, else 0)
pub fn has(&self, f: FontId) -> bool
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn metrics(&self, f: FontId) -> Option<FontMetrics>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Fonts
impl !UnwindSafe for Fonts
impl Forget for Fonts
impl Freeze for Fonts
impl Move for Fonts
impl Send for Fonts
impl Sync for Fonts
impl Unpin for Fonts
impl UnsafeUnpin for Fonts
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