pub struct Font { /* private fields */ }Implementations§
Source§impl Font
impl Font
pub fn new( id: FontId, rasterizer: Rc<RefCell<Rasterizer>>, face: FontFace, ascender_fudge_in_ems: f32, descender_fudge_in_ems: f32, ) -> Font
pub fn id(&self) -> FontId
pub fn units_per_em(&self) -> f32
pub fn ascender_in_ems(&self) -> f32
pub fn descender_in_ems(&self) -> f32
pub fn line_gap_in_ems(&self) -> f32
pub fn glyph_outline(&self, glyph_id: u16) -> Option<GlyphOutline>
pub fn glyph_outline_bounds_in_ems( &self, glyph_id: u16, out_outline: &mut Option<GlyphOutline>, ) -> Option<Rect<f32>>
pub fn glyph_raster_image( &self, glyph_id: u16, dpxs_per_em: f32, ) -> Option<GlyphRasterImage<'_>>
pub fn rasterize_glyph( &self, glyph_id: u16, dpxs_per_em: f32, ) -> Option<RasterizedGlyph>
Trait Implementations§
impl Eq for Font
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> ActionTrait for T
impl<T> ActionTrait for T
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