pub struct PositionedGlyph {
pub glyph_id: u16,
pub x: f32,
pub y: f32,
pub text: String,
}Expand description
One positioned glyph, baseline-relative, measured from the run origin in pixels.
Positive x is rightward; positive y is downward (0 = on the baseline).
Fields§
§glyph_id: u16Glyph identifier within the resolved font face.
x: f32Horizontal offset from the run origin, in pixels.
y: f32Vertical offset from the baseline, in pixels (positive = below baseline).
text: StringSource Unicode text this glyph maps back to, for text extraction (PDF ToUnicode). The first glyph of a shaping cluster carries the whole cluster’s source substring (so a ligature maps to all its chars); later glyphs of the same cluster carry an empty string. Empty means “no source text” — extraction emits nothing for this glyph.
Trait Implementations§
Source§impl Clone for PositionedGlyph
impl Clone for PositionedGlyph
Source§fn clone(&self) -> PositionedGlyph
fn clone(&self) -> PositionedGlyph
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PositionedGlyph
impl Debug for PositionedGlyph
Source§impl PartialEq for PositionedGlyph
impl PartialEq for PositionedGlyph
Source§fn eq(&self, other: &PositionedGlyph) -> bool
fn eq(&self, other: &PositionedGlyph) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for PositionedGlyph
Auto Trait Implementations§
impl Freeze for PositionedGlyph
impl RefUnwindSafe for PositionedGlyph
impl Send for PositionedGlyph
impl Sync for PositionedGlyph
impl Unpin for PositionedGlyph
impl UnsafeUnpin for PositionedGlyph
impl UnwindSafe for PositionedGlyph
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