Improve performance of layout lines

This commit is contained in:
Jeremy Soller 2022-10-05 11:28:05 -06:00
parent 682407d15a
commit 3227efef89
No known key found for this signature in database
GPG key ID: 87F211AF2BE4C2FE
5 changed files with 85 additions and 32 deletions

View file

@ -1,7 +1,8 @@
use core::marker::PhantomData;
use super::FontLineIndex;
pub struct FontLayoutGlyph<'a, T: 'a> {
pub line_i: usize,
pub start: usize,
pub end: usize,
pub x: f32,
@ -14,6 +15,7 @@ pub struct FontLayoutGlyph<'a, T: 'a> {
}
pub struct FontLayoutLine<'a> {
pub line_i: FontLineIndex,
pub glyphs: Vec<FontLayoutGlyph<'a, ()>>,
}