pub struct FontTexture { /* private fields */ }
Expand description
Texture which contains the characters of the font.
Implementations§
Source§impl FontTexture
impl FontTexture
Sourcepub fn ascii_character_list() -> Vec<char>
pub fn ascii_character_list() -> Vec<char>
Vec
Sourcepub fn new<R, F, I>(
facade: &F,
font: R,
font_size: u32,
characters_list: I,
) -> Result<FontTexture, Error>
pub fn new<R, F, I>( facade: &F, font: R, font_size: u32, characters_list: I, ) -> Result<FontTexture, Error>
Creates a new texture representing a font stored in a FontTexture
.
This function is very expensive as it needs to rasterize font into a
texture. Complexity grows as font_size**2 * characters_list.len()
.
Avoid rasterizing everything at once as it will be slow and end up in
out of memory abort.
Auto Trait Implementations§
impl !Freeze for FontTexture
impl !RefUnwindSafe for FontTexture
impl !Send for FontTexture
impl !Sync for FontTexture
impl Unpin for FontTexture
impl !UnwindSafe for FontTexture
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