1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-22 16:18:08 +02:00

Fixes Type3 negative font direction

This commit is contained in:
Yury Delendik 2014-08-18 17:57:52 -05:00
parent 4ef70588de
commit be998261cc
4 changed files with 11 additions and 2 deletions

View file

@ -1473,7 +1473,7 @@ var CanvasGraphics = (function CanvasGraphicsClosure() {
ctx.transform.apply(ctx, current.textMatrix);
ctx.translate(current.x, current.y);
ctx.scale(textHScale, 1);
ctx.scale(textHScale, fontDirection);
for (i = 0; i < glyphsLength; ++i) {
glyph = glyphs[i];
@ -1503,7 +1503,7 @@ var CanvasGraphics = (function CanvasGraphicsClosure() {
this.restore();
var transformed = Util.applyTransform([glyph.width, 0], fontMatrix);
width = ((transformed[0] * fontSize + charSpacing) * fontDirection);
width = transformed[0] * fontSize + charSpacing;
ctx.translate(width, 0);
current.x += width * textHScale;