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

@ -10,6 +10,19 @@ mod shape;
pub use self::system::*;
mod system;
#[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
pub struct FontLineIndex(usize);
impl FontLineIndex {
pub fn new(index: usize) -> Self {
Self(index)
}
pub fn get(&self) -> usize {
self.0
}
}
pub struct Font<'a> {
data: &'a [u8],
pub rustybuzz: rustybuzz::Face<'a>,