Apply XeLaTeX CMaps to document text and embedded fonts

This commit is contained in:
gloamxun committed 2026-11-28 21:40:17 +08:00
1 parent af6466cd98
commit 7d460e0fa1
20 files changed
+747 -65

No files matched your search

+6 -1
View File
@@ -36,6 +36,7 @@ pub enum ResourceKind {
FontMapping,
PdfImage,
Sfd,
CMap,
}
impl ResourceKind {
fn directory(self) -> &'static str {
@@ -52,6 +53,7 @@ impl ResourceKind {
Self::Format | Self::Config => "web2c",
Self::FontMapping => "fonts/misc",
Self::Sfd => "fonts/sfd",
Self::CMap => "fonts/cmap",
}
}
fn environment(self) -> &'static str {
@@ -69,6 +71,7 @@ impl ResourceKind {
Self::Config => "TEXMFCNF",
Self::FontMapping => "MISCFONTS",
Self::Sfd => "SFDFONTS",
Self::CMap => "CMAPFONTS",
}
}
fn extensions(self) -> &'static [&'static str] {
@@ -86,9 +89,10 @@ impl ResourceKind {
Self::Config => &["cnf"],
Self::FontMapping => &["tec"],
Self::Sfd => &["sfd"],
Self::CMap => &[],
}
}
const ALL: [Self; 13] = [
const ALL: [Self; 14] = [
Self::Tex,
Self::Tfm,
Self::Vf,
@@ -102,6 +106,7 @@ impl ResourceKind {
Self::Config,
Self::FontMapping,
Self::Sfd,
Self::CMap,
];
}
#[derive(Clone, Debug, PartialEq, Eq, serde::Serialize, serde::Deserialize)]