Store original text as lines, reshape only changed lines

This commit is contained in:
Jeremy Soller 2022-10-05 10:43:59 -06:00
parent f7eb123140
commit bc953df0d6
No known key found for this signature in database
GPG key ID: 87F211AF2BE4C2FE
4 changed files with 46 additions and 40 deletions

View file

@ -5,6 +5,7 @@ use core::marker::PhantomData;
use super::{FontLayoutGlyph, FontLayoutLine};
pub struct FontShapeGlyph<'a> {
pub line_i: usize,
pub start: usize,
pub end: usize,
pub x_advance: f32,
@ -98,6 +99,7 @@ impl<'a> FontShapeLine<'a> {
));
glyphs.push(FontLayoutGlyph {
line_i: glyph.line_i,
start: glyph.start,
end: glyph.end,
x,