PDF.js displays blurry plots in PDF documents, e.g.

http://arxiv.org/pdf/1202.5344v1.pdf

When viewed in Chrome or Adobe Acrobat all the plots show sharp-edged squares. When viewed in Preview or PDF.js, all the squares show as blurry pixelated blobs.

const ctx = this.ctx;
      const current = this.current;
      const font = current.font;
      const fontSize = current.fontSize;
      const fontDirection = current.fontDirection;
      const spacingDir = font.vertical ? 1 : -1;
      const charSpacing = current.charSpacing;
      const wordSpacing = current.wordSpacing;
      const textHScale = current.textHScale * fontDirection;
      const fontMatrix = current.fontMatrix || FONT_IDENTITY_MATRIX;
      const glyphsLength = glyphs.length;
      const isTextInvisible =
        current.textRenderingMode === TextRenderingMode.INVISIBLE;
      let i, glyph, width, spacingLength;
      if (isTextInvisible || fontSize === 0) {
        return;
      }
      this._cachedGetSinglePixelWidth = null;
      ctx.save();
      ctx.transform.apply(ctx, current.textMatrix);
      ctx.translate(current.x, current.y);
      ctx.scale(textHScale, fontDirection);
      for (i = 0; i < glyphsLength; ++i) {
        glyph = glyphs[i];