Render imported PDF TrueType device fonts from exact SFNT faces

This commit is contained in:
gloamxun committed 2026-11-28 04:21:30 +08:00
1 parent b640b26eff
commit 84d6f3ae51
14 files changed
+504 -76

No files matched your search

@@ -315,6 +315,15 @@ impl NativeFontCache {
.map(|(_, decoded)| decoded.program.clone()))
}
/// Resolve the real standalone glyph program for a PDF TrueType device font.
pub fn pdf_device_truetype(
files: &mut impl crate::execution::SourceProvider,
name: &str,
from: &str,
) -> Result<Option<Arc<[u8]>>, String> {
truetype::device_program(files, name, from)
}
// The caller reads the actual resource and verifies its bytes on this
// revision before asking for the decoded representation.
fn type1(&self, resource: &LoadedResource, transform: Type1Transform) -> Result<Arc<DecodedType1>, String> {