Add direction: ltr; to the canvases used in examples/learning, to ensure correct text rendering (issue 11457)

This is currently the only possible way of addressing the issue, until https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/direction becomes generally available in browsers.

*Note:* This will also require manually updating https://mozilla.github.io/pdf.js/examples/#interactive-examples
This commit is contained in:
Jonas Jenwald 2020-01-12 12:25:23 +01:00
parent 4729fdc0e9
commit 2e5faa8edc
3 changed files with 3 additions and 3 deletions

View File

@ -8,7 +8,7 @@
<h1>'Hello, world!' example</h1>
<canvas id="the-canvas" style="border:1px solid black"></canvas>
<canvas id="the-canvas" style="border: 1px solid black; direction: ltr;"></canvas>
<script src="../../node_modules/pdfjs-dist/build/pdf.js"></script>

View File

@ -8,7 +8,7 @@
<h1>'Hello, world!' example</h1>
<canvas id="the-canvas" style="border:1px solid black"></canvas>
<canvas id="the-canvas" style="border: 1px solid black; direction: ltr;"></canvas>
<script src="../../node_modules/pdfjs-dist/build/pdf.js"></script>

View File

@ -16,7 +16,7 @@
</div>
<div>
<canvas id="the-canvas" style="border:1px solid black"></canvas>
<canvas id="the-canvas" style="border: 1px solid black; direction: ltr;"></canvas>
</div>
<script src="../../node_modules/pdfjs-dist/build/pdf.js"></script>