1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-22 16:18:08 +02:00

XFA - Remove quotes of font name in xhtml

This commit is contained in:
Calixte Denizet 2021-06-27 18:05:05 +02:00
parent d7f8a0e9b9
commit 677332aa7b
3 changed files with 11 additions and 2 deletions

View file

@ -29,7 +29,7 @@ import {
} from "./xfa_object.js";
import { $buildXFAObject, NamespaceIds } from "./namespaces.js";
import { fixTextIndent, measureToString, setFontFamily } from "./html_utils.js";
import { getMeasurement, HTMLResult } from "./utils.js";
import { getMeasurement, HTMLResult, stripQuotes } from "./utils.js";
const XHTML_NS_ID = NamespaceIds.xhtml.id;
@ -191,7 +191,7 @@ class XhtmlObject extends XmlObject {
continue;
}
if (key === "font-family") {
xfaFont.typeface = value;
xfaFont.typeface = stripQuotes(value);
} else if (key === "font-size") {
xfaFont.size = getMeasurement(value);
} else if (key === "font-weight") {