Skip to content

Instantly share code, notes, and snippets.

@notmasteryet
Created January 17, 2012 00:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save notmasteryet/1623832 to your computer and use it in GitHub Desktop.
Save notmasteryet/1623832 to your computer and use it in GitHub Desktop.
Small test for issue #999 for pdf.js
<html>
<script>
function run() {
var c = document.getElementById("c");
var ctx = c.getContext("2d");
ctx.font = "30px serif";
ctx.fillText("A", 20, 60);
ctx.fillText("B", 40, 60);
var c2 = document.getElementById("c2");
var ctx2 = c2.getContext("2d");
ctx2.scale(30, 30);
ctx2.font = "1px serif";
ctx2.fillText("A", 0.66666667, 2);
ctx2.fillText("B", 1.33333333, 2);
}
</script>
<style>
canvas { border: 1px solid blue; }
</style>
<body onload="run()">
<canvas id="c" width="100" height="75"></canvas>
<br>
<canvas id="c2" width="100" height="75"></canvas>
</body></html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment