XFA - Don't use system font when a font is not embeded but there is a substitution

- always use a font coming from pdf.js when there is one: this way we don't use a system font which could looks wrong.
This commit is contained in:
Calixte Denizet 2021-07-03 15:13:51 +02:00
parent d80651e572
commit 5744dd773d

View File

@ -481,7 +481,7 @@ function setFontFamily(xfaFont, fontFinder, style) {
if (typeface) {
const { fontFamily } = typeface.regular.cssFontInfo;
if (fontFamily !== name) {
style.fontFamily += `,"${fontFamily}"`;
style.fontFamily = `"${fontFamily}"`;
}
if (style.lineHeight) {
// Already something so don't overwrite.