Render and embed TrueType fonts selected by pdfTeX maps

This commit is contained in:
gloamxun committed 2026-11-28 02:30:30 +08:00
1 parent aa780a800b
commit 46ef76f890
9 files changed
+570 -36

No files matched your search

+6 -6
View File
@@ -168,7 +168,7 @@ struct NativeSvgGlyph<'a> {
font: &'a str,
glyph: &'a str,
path: &'a str,
type1: bool,
scalable: bool,
}
impl DisplayItem {
@@ -195,7 +195,7 @@ impl DisplayItem {
.filter(|_| paint.encoding.len() == 256)
.ok_or_else(|| {
format!(
"native Type1 SVG outline is not resolved for {} slot {slot}",
"native SVG outline is not resolved for {} slot {slot}",
font.name
)
})?;
@@ -207,9 +207,9 @@ impl DisplayItem {
font: paint.program.name(),
glyph: &paint.encoding[usize::from(*slot)],
path,
type1: matches!(
scalable: !matches!(
paint.program,
crate::native_font::NativeFontProgram::Type1(_)
crate::native_font::NativeFontProgram::Pk(_)
),
})
})())
@@ -552,7 +552,7 @@ impl DisplayList {
font,
glyph,
path,
type1,
scalable,
} = item
.native_svg_glyph()
.unwrap()
@@ -565,7 +565,7 @@ impl DisplayList {
} else {
scale * f64::from(1000 + expansion) / 1000.0
};
let label = if type1 {
let label = if scalable {
crate::type1::glyph_unicode_text(glyph).unwrap_or_default()
} else {
String::new()