pub struct GlyphBox {
pub text: String,
pub x: f64,
pub y: f64,
pub advance: f64,
pub size: f64,
}Expand description
One glyph the renderer painted, in page space: points, y growing upwards,
the origin at the page’s visible box – the same convention
pdf2::TextSpan uses, so a text layer can mix the two.
advance is how far the pen moved for this glyph, and size is the font
size the renderer used for it: together they are what an invisible text
layer needs to sit exactly on the paint, whatever font the browser
substitutes.
Fields§
§text: StringThe character this code stands for, empty when the encoding has none.
x: f64Baseline origin, x.
y: f64Baseline origin, y.
advance: f64Pen advance for this glyph, in page units.
size: f64Effective font size, in page units.
Trait Implementations§
impl StructuralPartialEq for GlyphBox
Auto Trait Implementations§
impl Forget for GlyphBox
impl Freeze for GlyphBox
impl Move for GlyphBox
impl RefUnwindSafe for GlyphBox
impl Send for GlyphBox
impl Sync for GlyphBox
impl Unpin for GlyphBox
impl UnsafeUnpin for GlyphBox
impl UnwindSafe for GlyphBox
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