pub struct CachedGlyph {
pub verts: Vec<[f32; 2]>,
pub indices: Vec<u32>,
}Expand description
Pre-tessellated triangle mesh for one glyph at a specific pixel size.
All coordinates are in glyph-local pixels (origin 0, 0).
To place on screen: for each [vx, vy] in verts compute
transform_pt(pen_x + vx as f64, baseline_y + vy as f64).
Fields§
§verts: Vec<[f32; 2]>Flattened vertex list — each element is one screen-space [x, y].
indices: Vec<u32>Triangle index list — every three consecutive values index a triangle
into verts.
Auto Trait Implementations§
impl Freeze for CachedGlyph
impl RefUnwindSafe for CachedGlyph
impl Send for CachedGlyph
impl Sync for CachedGlyph
impl Unpin for CachedGlyph
impl UnsafeUnpin for CachedGlyph
impl UnwindSafe for CachedGlyph
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