Render and embed TrueType fonts selected by pdfTeX maps
This commit is contained in:
1 parent
aa780a800b
commit
46ef76f890
9 files changed
+570
-36
No files matched your search
@@ -38,6 +38,21 @@ impl MapEntry {
|
||||
self.file.is_some() || self.postscript_name
|
||||
}
|
||||
|
||||
pub(super) fn true_type_file(&self) -> Option<&str> {
|
||||
self.file.as_deref().filter(|file| {
|
||||
Path::new(file)
|
||||
.extension()
|
||||
.and_then(|extension| extension.to_str())
|
||||
.is_some_and(|extension| {
|
||||
extension.eq_ignore_ascii_case("ttf") || extension.eq_ignore_ascii_case("ttc")
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
pub(super) fn postscript_name(&self) -> Option<&str> {
|
||||
self.ps_name.as_deref()
|
||||
}
|
||||
|
||||
pub(super) fn type1_file(&self, name: &str) -> Result<&str, String> {
|
||||
let file = self.file.as_deref().ok_or_else(|| {
|
||||
format!("font map {name} has no embedded Type1 program; mapped device fonts require their actual support")
|
||||
|
||||
Reference in new issue
Block a user