Struct sdl2_ttf::Sdl2TtfContext
[−]
[src]
#[must_use] pub struct Sdl2TtfContext;
A context manager for SDL2_TTF
to manage C code initialization and clean-up.
Methods
impl Sdl2TtfContext
[src]
fn load_font(&self, path: &Path, point_size: u16) -> Result<Font, String>
Loads a font from the given file with the given size in points.
fn load_font_at_index(&self, path: &Path, index: u32, point_size: u16) -> Result<Font, String>
Loads the font at the given index of the file, with the given size in points.
fn load_font_from_rwops(&self, rwops: &mut RWops, point_size: u16) -> Result<Font, String>
Loads a font from the given SDL2 rwops object with the given size in points.
fn load_font_at_index_from_rwops(&self, rwops: &mut RWops, index: u32, point_size: u16) -> Result<Font, String>
Loads the font at the given index of the SDL2 rwops object with the given size in points.