pub struct FontAtlas {
pub texture: TextureData,
/* private fields */
}Fields§
§texture: TextureDataImplementations§
Source§impl FontAtlas
impl FontAtlas
Sourcepub fn from_bytes(font_data: &[u8], atlas_size: usize) -> Result<Self, String>
pub fn from_bytes(font_data: &[u8], atlas_size: usize) -> Result<Self, String>
Load a TrueType/OpenType font from raw bytes. atlas_size must be a power of two.
Sourcepub fn get_or_rasterize(&mut self, c: char, px: f32) -> GlyphInfo
pub fn get_or_rasterize(&mut self, c: char, px: f32) -> GlyphInfo
Retrieve (and rasterize if missing) glyph info for a char at a given pixel size.
Auto Trait Implementations§
impl Freeze for FontAtlas
impl RefUnwindSafe for FontAtlas
impl Send for FontAtlas
impl Sync for FontAtlas
impl Unpin for FontAtlas
impl UnsafeUnpin for FontAtlas
impl UnwindSafe for FontAtlas
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