Update src/display/{annotation_layer.js, svg.js}
to determine the fontWeight
in the same way as with canvas (PR 6091 and 7839 follow-up)
This commit is contained in:
parent
6590cc32f2
commit
78917bab91
@ -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.
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user