From a64536901ab2ac00d77cda1030c111f423ef24e8 Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Sat, 6 Jun 2015 21:29:41 +0200 Subject: [PATCH] Increase the font weight used for non-embedded ArialBlack fonts Currently non-embedded ArialBlack fonts are not rendered bold enough, compared to e.g. Adobe Reader. The issue is that we set the font weight to `bolder`, but since that is actually relative to the font weight of the parent, the result is that there's no practical difference from just using `bold`. This patch attempts to address that, by explicitly setting the font weight to the maximum value instead (see https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight). *Note:* I expect one test "failure" in `issue5801`, which in this case is an improvement, since that PDF file uses ArialBlack. --- src/display/canvas.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/display/canvas.js b/src/display/canvas.js index 4ef3307f1..ef987f919 100644 --- a/src/display/canvas.js +++ b/src/display/canvas.js @@ -1225,7 +1225,7 @@ var CanvasGraphics = (function CanvasGraphicsClosure() { } var name = fontObj.loadedName || 'sans-serif'; - var bold = fontObj.black ? (fontObj.bold ? 'bolder' : 'bold') : + var bold = fontObj.black ? (fontObj.bold ? '900' : 'bold') : (fontObj.bold ? 'bold' : 'normal'); var italic = fontObj.italic ? 'italic' : 'normal';