pub struct Glyphs {
shaper: Shaper,
outlines: Outlines,
inked: RefCell<HashMap<GlyphId, Option<Path2d>>>,
}Expand description
Fields§
§shaper: Shaper§outlines: Outlines§inked: RefCell<HashMap<GlyphId, Option<Path2d>>>Glyphs already traced into the browser’s own path type. None where
the glyph draws nothing, so a space is looked up rather than retraced.
Implementations§
Trait Implementations§
Source§impl TextLayout for Glyphs
impl TextLayout for Glyphs
Source§fn typeface(&self) -> FontChoice
fn typeface(&self) -> FontChoice
The typeface this engine lays text out in. The SVG export traces its
outlines from that face’s own bytes, so an engine that answered for a
different one would place one font’s glyphs at another’s pen positions.
Source§fn layout(&self, text: &str, font: &Font, wrap: WorldPx) -> Layout
fn layout(&self, text: &str, font: &Font, wrap: WorldPx) -> Layout
Lay
text out in font, word-wrapped at wrap
(WorldPx::UNBOUNDED for an unwrapped run). An exporter’s engine
lays out at one pixel per point, so a resolution-independent format
inherits no display’s DPI; the screen’s lays out at the display’s, so
a mark recorded through it lands where the screen draws it.Auto Trait Implementations§
impl !Freeze for Glyphs
impl !RefUnwindSafe for Glyphs
impl Send for Glyphs
impl !Sync for Glyphs
impl Unpin for Glyphs
impl UnsafeUnpin for Glyphs
impl UnwindSafe for Glyphs
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