move ShapeBuffer to FontSystem

This commit is contained in:
koe 2024-09-01 23:07:18 -05:00 committed by Jeremy Soller
parent 0935f549ee
commit 9dc024616b
5 changed files with 69 additions and 186 deletions

View file

@ -6,7 +6,7 @@ use alloc::vec::Vec;
use fontdb::Family;
use unicode_script::Script;
use crate::{Font, FontMatchKey, FontSystem, ShapePlanCache};
use crate::{Font, FontMatchKey, FontSystem, ShapeBuffer, ShapePlanCache};
use self::platform::*;
@ -119,8 +119,11 @@ impl<'a> FontFallbackIter<'a> {
}
}
pub fn shape_plan_cache(&mut self) -> &mut ShapePlanCache {
self.font_system.shape_plan_cache()
pub fn shape_caches(&mut self) -> (&mut ShapeBuffer, &mut ShapePlanCache) {
(
&mut self.font_system.shape_buffer,
&mut self.font_system.shape_plan_cache,
)
}
fn face_contains_family(&self, id: fontdb::ID, family_name: &str) -> bool {