mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-28 23:28:16 +02:00
Add an option to enable/disable hardware acceleration (bug 1902012)
This commit is contained in:
parent
341ff40e74
commit
ff6180a4c9
13 changed files with 62 additions and 12 deletions
|
@ -242,7 +242,7 @@ class FakeUnicodeFont {
|
|||
this.fontFamily = fontFamily;
|
||||
|
||||
const canvas = new OffscreenCanvas(1, 1);
|
||||
this.ctxMeasure = canvas.getContext("2d");
|
||||
this.ctxMeasure = canvas.getContext("2d", { willReadFrequently: true });
|
||||
|
||||
if (!FakeUnicodeFont._fontNameId) {
|
||||
FakeUnicodeFont._fontNameId = 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue