Support unembedded pdfTeX Type 1 device fonts in export and preview

This commit is contained in:
gloamxun committed 2026-11-28 03:44:29 +08:00
1 parent 60d67bbb7b
commit c0970bdbf6
10 files changed
+466 -34

No files matched your search

+6 -5
View File
@@ -193,11 +193,12 @@ impl DisplayItem {
.glyph_paths
.get(slot)
.filter(|_| paint.encoding.len() == 256)
.ok_or_else(|| {
format!(
"native SVG outline is not resolved for {} slot {slot}",
font.name
)
.ok_or_else(|| match &paint.program {
crate::native_font::NativeFontProgram::DeviceType1(program) => format!(
"native preview needs the actual device font {} with glyph {}",
program.name, paint.encoding.get(usize::from(*slot)).map_or(".notdef", String::as_str)
),
_ => format!("native SVG outline is not resolved for {} slot {slot}", font.name),
})?;
Ok(NativeSvgGlyph {
position: [*x, *y],