Skip to content

Commit

Permalink
Merge pull request #972 from notmasteryet/textstroke
Browse files Browse the repository at this point in the history
Correct stroke width for text; convert intel-load test to eq-test
  • Loading branch information
brendandahl committed Dec 29, 2011
2 parents d6e1c8f + d7754a4 commit 9161c2e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/canvas.js
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,7 @@ var CanvasGraphics = (function CanvasGraphicsClosure() {
ctx.translate(current.x, current.y);

ctx.scale(textHScale, 1);
ctx.lineWidth /= current.textMatrix[0];

if (textSelection) {
this.save();
Expand Down Expand Up @@ -708,6 +709,8 @@ var CanvasGraphics = (function CanvasGraphicsClosure() {
} else {
ctx.save();
this.applyTextTransforms();
ctx.lineWidth /= current.textMatrix[0] * fontMatrix[0];

if (textSelection)
text.geom = this.getTextGeometry();

Expand Down
5 changes: 3 additions & 2 deletions test/test_manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@
"rounds": 1,
"type": "load"
},
{ "id": "intelisa-load",
{ "id": "intelisa-eq",
"file": "pdfs/intelisa.pdf",
"md5": "f5712097d29287a97f1278839814f682",
"link": true,
"pageLimit": 100,
"rounds": 1,
"type": "load"
"type": "eq"
},
{ "id": "pdfspec-load",
"file": "pdfs/pdf.pdf",
Expand Down

0 comments on commit 9161c2e

Please sign in to comment.