mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Merge pull request #10597 from Snuffleupagus/isFontSubpixelAAEnabled-canvas-cleanup
Ensure that the temporary canvas created in `CanvasGraphics.isFontSubpixelAAEnabled` will be cleared
This commit is contained in:
commit
39fa26ea33
1 changed files with 2 additions and 1 deletions
|
@ -1417,7 +1417,8 @@ var CanvasGraphics = (function CanvasGraphicsClosure() {
|
|||
get isFontSubpixelAAEnabled() {
|
||||
// Checks if anti-aliasing is enabled when scaled text is painted.
|
||||
// On Windows GDI scaled fonts looks bad.
|
||||
var ctx = this.canvasFactory.create(10, 10).context;
|
||||
const { context: ctx, } =
|
||||
this.cachedCanvases.getCanvas('isFontSubpixelAAEnabled', 10, 10);
|
||||
ctx.scale(1.5, 1);
|
||||
ctx.fillText('I', 0, 10);
|
||||
var data = ctx.getImageData(0, 0, 10, 10).data;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue