pub struct Font;Implementations§
Source§impl Font
impl Font
pub fn new( _typeface: impl Into<Typeface>, _size: impl Into<Option<f32>>, ) -> Self
pub fn from_typeface( _typeface: impl Into<Typeface>, _size: impl Into<Option<f32>>, ) -> Self
pub fn set_size(&mut self, _size: f32) -> &mut Self
pub fn set_subpixel(&mut self, _subpixel: bool) -> &mut Self
pub fn set_hinting(&mut self, _hinting: FontHinting) -> &mut Self
pub fn set_edging(&mut self, _edging: FontEdging) -> &mut Self
pub fn set_force_auto_hinting(&mut self, _force: bool) -> &mut Self
pub fn measure_str( &self, _str: impl AsRef<str>, _paint: Option<&Paint>, ) -> (f32, Rect)
pub fn metrics(&self) -> (f32, FontMetrics)
pub fn spacing(&self) -> f32
pub fn count_text(&self, _text: impl AsRef<str>) -> usize
pub fn text_to_glyphs_vec(&self, _text: impl AsRef<str>) -> Vec<u16>
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 UnsafeUnpin 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