pub struct Font { /* private fields */ }
Implementations§
source§impl Font
impl Font
pub fn new(name: &str) -> Result<Self, Error>
pub fn new_with_index(name: &str, index: i32) -> Result<Self, Error>
pub fn from_bytes(name: &str, font_data: &[u8]) -> Result<Self, Error>
pub fn from_bytes_with_index( name: &str, index: i32, font_data: &[u8] ) -> Result<Self, Error>
pub fn name(&self) -> &str
pub fn is_bold(&self) -> bool
pub fn is_italic(&self) -> bool
pub fn is_monospaced(&self) -> bool
pub fn is_serif(&self) -> bool
pub fn ascender(&self) -> f32
pub fn descender(&self) -> f32
pub fn encode_character(&self, unicode: i32) -> Result<i32, Error>
pub fn advance_glyph_with_wmode( &self, glyph: i32, wmode: bool ) -> Result<f32, Error>
pub fn advance_glyph(&self, glyph: i32) -> Result<f32, Error>
pub fn outline_glyph_with_ctm( &self, glyph: i32, ctm: &Matrix ) -> Result<Path, Error>
pub fn outline_glyph(&self, glyph: i32) -> Result<Path, Error>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Font
impl RefUnwindSafe for Font
impl !Send for Font
impl !Sync for Font
impl Unpin for Font
impl UnwindSafe for Font
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more