diff --git a/src/display/annotation_layer.js b/src/display/annotation_layer.js index 4bc768f27..1b09a210a 100644 --- a/src/display/annotation_layer.js +++ b/src/display/annotation_layer.js @@ -510,13 +510,7 @@ class TextWidgetAnnotationElement extends WidgetAnnotationElement { return; } - style.fontWeight = font.black - ? font.bold - ? "900" - : "bold" - : font.bold - ? "bold" - : "normal"; + style.fontWeight = font.black ? "900" : font.bold ? "bold" : "normal"; style.fontStyle = font.italic ? "italic" : "normal"; // Use a reasonable default font if the font doesn't specify a fallback. diff --git a/src/display/svg.js b/src/display/svg.js index 8c466446f..0451b0630 100644 --- a/src/display/svg.js +++ b/src/display/svg.js @@ -942,13 +942,7 @@ if (typeof PDFJSDev === "undefined" || PDFJSDev.test("GENERIC")) { ? fontObj.fontMatrix : FONT_IDENTITY_MATRIX; - const bold = fontObj.black - ? fontObj.bold - ? "bolder" - : "bold" - : fontObj.bold - ? "bold" - : "normal"; + const bold = fontObj.black ? "900" : fontObj.bold ? "bold" : "normal"; const italic = fontObj.italic ? "italic" : "normal"; if (size < 0) {