Browse Source

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.
Jonas Jenwald 10 years ago
parent
commit
a64536901a
  1. 2
      src/display/canvas.js

2
src/display/canvas.js

@ -1225,7 +1225,7 @@ var CanvasGraphics = (function CanvasGraphicsClosure() { @@ -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';

Loading…
Cancel
Save