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<'a>(
&'a self,
path: &'a Path,
point_size: u16
) -> Result<Font, String>
&'a self,
path: &'a 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<'a>(
&'a self,
path: &'a Path,
index: u32,
point_size: u16
) -> Result<Font, String>
&'a self,
path: &'a 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<'a, 'b>(
&'a self,
rwops: RWops<'b>,
point_size: u16
) -> Result<Font<'b>, String>
&'a self,
rwops: RWops<'b>,
point_size: u16
) -> Result<Font<'b>, String>
Loads a font from the given SDL2 rwops object with the given size in points.
fn load_font_at_index_from_rwops<'a, 'b>(
&'a self,
rwops: RWops<'b>,
index: u32,
point_size: u16
) -> Result<Font<'b>, String>
&'a self,
rwops: RWops<'b>,
index: u32,
point_size: u16
) -> Result<Font<'b>, String>
Loads the font at the given index of the SDL2 rwops object with the given size in points.