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
@ -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…
Reference in New Issue
Block a user