Render imported PDF TrueType device fonts from exact SFNT faces
This commit is contained in:
1 parent
b640b26eff
commit
84d6f3ae51
14 files changed
+504
-76
No files matched your search
@@ -1676,6 +1676,15 @@ impl SourceProvider for Files {
|
||||
}
|
||||
Ok(selected)
|
||||
}
|
||||
fn pdf_truetype(
|
||||
&mut self, name: &str, from: &str,
|
||||
) -> Result<Option<texrra_tex_core::resources::NamedFont>, String> {
|
||||
let selected = self.world.read_pdf_truetype(name, Path::new(from))?;
|
||||
if let Some(font) = &selected {
|
||||
self.observe_resource(ResourceKind::TrueType, &font.resource);
|
||||
}
|
||||
Ok(selected)
|
||||
}
|
||||
fn optional_font_file(&mut self, kind: ResourceKind, name: &str, from: &str) -> Result<Option<LoadedResource>, String> {
|
||||
let resource = self.world.read_optional(kind, name, Path::new(from))?;
|
||||
if let Some(resource) = &resource {
|
||||
|
||||
Reference in new issue
Block a user