Improve performance of layout lines
This commit is contained in:
parent
682407d15a
commit
3227efef89
5 changed files with 85 additions and 32 deletions
|
|
@ -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>,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue