[Pkg-javascript-commits] [pdf.js] 82/106: Increase the font weight used for non-embedded ArialBlack fonts
David Prévot
taffit at moszumanska.debian.org
Sat Jun 20 21:35:13 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository pdf.js.
commit a64536901ab2ac00d77cda1030c111f423ef24e8
Author: Jonas Jenwald <jonas.jenwald at gmail.com>
Date: Sat Jun 6 21:29:41 2015 +0200
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 4ef3307..ef987f9 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';
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/pdf.js.git
More information about the Pkg-javascript-commits
mailing list