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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more