[−][src]Struct miniquad_text_rusttype::FontAtlas
Texture which contains the characters of the font.
Fields
texture: Texture
character_infos: AtlasCharacterInfos
font_size: u32
Methods
impl FontAtlas
[src]
pub fn ascii_character_list() -> Vec<char>
[src]
Vec
pub fn cyrllic_character_list() -> Vec<char>
[src]
pub fn thai_character_list() -> Vec<char>
[src]
pub fn vietnamese_character_list() -> Vec<char>
[src]
pub fn new<R, I>(
font: R,
font_size: u32,
characters_list: I
) -> Result<FontAtlas, Error> where
R: Read,
I: IntoIterator<Item = char>,
[src]
font: R,
font_size: u32,
characters_list: I
) -> Result<FontAtlas, Error> where
R: Read,
I: IntoIterator<Item = char>,
Creates a new texture representing a font stored in a FontAtlas
.
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 RefUnwindSafe for FontAtlas
impl Send for FontAtlas
impl Sync for FontAtlas
impl Unpin for FontAtlas
impl UnwindSafe for FontAtlas
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,