Integrate into existing font cache

This commit is contained in:
Adam
2025-09-27 17:50:12 -07:00
parent f96a44c4bc
commit e6d6aa6873
6 changed files with 51 additions and 157 deletions

View File

@@ -2,6 +2,7 @@ use dyn_any::DynAny;
use glam::{DAffine2, DVec2};
use graphene_core::subpath::{ManipulatorGroup, PathSegPoints, Subpath, pathseg_points};
use graphene_core::table::{Table, TableRow, TableRowRef};
use graphene_core::text::TextContext;
use graphene_core::vector::algorithms::merge_by_distance::MergeByDistanceExt;
use graphene_core::vector::style::Fill;
use graphene_core::vector::{PointId, Vector};
@@ -318,7 +319,10 @@ fn flatten_vector(graphic_table: &Table<Graphic>) -> Table<Vector> {
}
})
.collect::<Vec<_>>(),
Graphic::Typography(typography) => typography.into_iter().flat_map(|row| row.element.to_vector()).collect::<Vec<_>>(),
Graphic::Typography(typography) => typography
.into_iter()
.flat_map(|row| TextContext::with_thread_local(|ctx| ctx.layout_to_path(row.element.layout, 0., false)))
.collect::<Vec<_>>(),
}
})
.collect()