diff --git a/src/Parse.js b/src/Parse.js index b364fe4..6ff9d07 100644 --- a/src/Parse.js +++ b/src/Parse.js @@ -168,7 +168,7 @@ _html2canvas.Parse = function (images, options) { renderRect(ctx, bounds.left, Math.round(bounds.top + metrics.baseline + metrics.lineWidth), bounds.width, 1, color); break; case "overline": - renderRect(ctx, bounds.left, bounds.top, bounds.width, 1, color); + renderRect(ctx, bounds.left, Math.round(bounds.top), bounds.width, 1, color); break; case "line-through": // TODO try and find exact position for line-through diff --git a/tests/readme.md b/tests/readme.md index 715104e..bf29ecd 100644 --- a/tests/readme.md +++ b/tests/readme.md @@ -21,7 +21,7 @@ list/upper-roman.html99.45%99.61%35.11% overflow.html96.85%97.49%96.51% text/linethrough.html97.14%94.12%45.74% -text/text.html95.42%94.41%79.85% +text/text.html95.71%94.67%79.85% text/underline-lineheight.html97.06%92.35%51.38% text/underline.html97.65%93.5%45.69% visibility.html99.19%98.92%99.39%