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
@@ -157,7 +157,8 @@ impl NativeText {
|
||||
let expansion = if self.xdv { font.expansion } else { self.expansion };
|
||||
let advance = match &paint.program {
|
||||
crate::native_font::NativeFontProgram::Pk(pk) => pk.advances[&slot],
|
||||
crate::native_font::NativeFontProgram::Type1(_) => {
|
||||
crate::native_font::NativeFontProgram::Type1(_)
|
||||
| crate::native_font::NativeFontProgram::TrueType(_) => {
|
||||
let factor = i64::from(1000 + expansion);
|
||||
let width = if !self.xdv || font.layout_metrics.is_some() {
|
||||
Self::round_scale(font.advance(slot), 1000, factor)
|
||||
@@ -268,6 +269,7 @@ impl FontHistory {
|
||||
&& matches!(
|
||||
paint.program,
|
||||
crate::native_font::NativeFontProgram::Type1(_)
|
||||
| crate::native_font::NativeFontProgram::TrueType(_)
|
||||
)
|
||||
&& !self.first_scalable.contains_key(&font.name)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user