pub struct Font { /* private fields */ }Expand description
TTF font loaded to GPU
Implementations§
source§impl Font
impl Font
sourcepub fn ascii_character_list() -> Vec<char>
pub fn ascii_character_list() -> Vec<char>
List of ascii characters, may be helpful in combination with “populate_font_cache”
sourcepub fn latin_character_list() -> Vec<char>
pub fn latin_character_list() -> Vec<char>
List of latin characters
pub fn populate_font_cache(&self, characters: &[char], size: u16)
sourcepub fn set_filter(&mut self, filter_mode: FilterMode)
pub fn set_filter(&mut self, filter_mode: FilterMode)
Sets the FilterMode of this font’s texture atlas.
Use Nearest if you need integer-ratio scaling for pixel art, for example.
Example
let font = Font::default();
font.set_filter(FilterMode::Linear);Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Font
impl Send for Font
impl Sync for Font
impl Unpin 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