From 5744dd773d6d7db0093182788263d6a5dc1dfbf8 Mon Sep 17 00:00:00 2001 From: Calixte Denizet Date: Sat, 3 Jul 2021 15:13:51 +0200 Subject: [PATCH] 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. --- src/core/xfa/html_utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/xfa/html_utils.js b/src/core/xfa/html_utils.js index d7cbd365c..62013a266 100644 --- a/src/core/xfa/html_utils.js +++ b/src/core/xfa/html_utils.js @@ -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.