[−][src]Struct psf::Font
Stores information about specific loaded font, including number of available characters, and each character width and height.
Implementations
impl Font
[src]
pub fn new<P: AsRef<Path>>(path: P) -> Result<Font, Error>
[src]
Creates a new font for specific path.
pub fn height(&self) -> usize
[src]
Returns height of every glyph
pub fn width(&self) -> usize
[src]
Returns width of every glyph
pub fn size(&self) -> usize
[src]
Returns number of available characters in the font
pub fn get_char(&self, c: char) -> Option<Glyph<u8>>
[src]
pub fn print_char(&self, c: char)
[src]
Prints specified character to standard output using print!
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
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>,