Struct allegro_font::Font
source · pub struct Font { /* private fields */ }
Implementations
sourceimpl Font
impl Font
pub fn new_builtin(_: &FontAddon) -> Result<Font, ()>
pub fn load_bitmap_font(_: &FontAddon, filename: &str) -> Result<Font, ()>
pub fn grab_from_bitmap(
_: &FontAddon,
bmp: &Bitmap,
ranges: &[(c_int, c_int)]
) -> Result<Font, ()>
pub unsafe fn wrap_allegro_font(font: *mut ALLEGRO_FONT) -> Result<Font, ()>
pub fn get_font(&self) -> *mut ALLEGRO_FONT
pub fn get_text_width(&self, text: &str) -> i32
pub fn get_line_height(&self) -> i32
pub fn get_ascent(&self) -> i32
pub fn get_descent(&self) -> i32
pub fn get_text_dimensions(&self, text: &str) -> (i32, i32, i32, i32)
Trait Implementations
Auto Trait Implementations
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more