diff --git a/src/canvas.js b/src/canvas.js index 32c171216..058b57b7e 100644 --- a/src/canvas.js +++ b/src/canvas.js @@ -157,6 +157,7 @@ var CanvasExtraState = (function CanvasExtraStateClosure() { this.wordSpacing = 0; this.textHScale = 1; this.textRenderingMode = TextRenderingMode.FILL; + this.textRise = 0; // Color spaces this.fillColorSpace = new DeviceGrayCS(); this.fillColorSpaceObj = null; @@ -601,7 +602,7 @@ var CanvasGraphics = (function CanvasGraphicsClosure() { this.current.textRenderingMode = mode; }, setTextRise: function CanvasGraphics_setTextRise(rise) { - TODO('text rise: ' + rise); + this.current.textRise = rise; }, moveText: function CanvasGraphics_moveText(x, y) { this.current.x = this.current.lineX += x; @@ -628,7 +629,7 @@ var CanvasGraphics = (function CanvasGraphicsClosure() { ctx.transform.apply(ctx, current.textMatrix); ctx.scale(1, -1); - ctx.translate(current.x, -1 * current.y); + ctx.translate(current.x, -current.y - current.textRise); ctx.transform.apply(ctx, fontMatrix); ctx.scale(textHScale, 1); }, diff --git a/test/test_manifest.json b/test/test_manifest.json index c3054ed54..8651fc953 100644 --- a/test/test_manifest.json +++ b/test/test_manifest.json @@ -367,7 +367,7 @@ "file": "pdfs/issue1944.pdf", "md5": "a4ef22c380b55747fb3d4a1c276b0950", "rounds": 1, - "pageLimit": 2, + "pageLimit": 1, "link": true, "type": "eq" },