@xterm/addon-webgl 0.18.0-beta.6 → 0.18.0-beta.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xterm/addon-webgl",
3
- "version": "0.18.0-beta.6",
3
+ "version": "0.18.0-beta.8",
4
4
  "author": {
5
5
  "name": "The xterm.js authors",
6
6
  "url": "https://xtermjs.org/"
@@ -3,7 +3,7 @@
3
3
  * @license MIT
4
4
  */
5
5
 
6
- import { isEmoji, throwIfFalsy } from 'browser/renderer/shared/RendererUtils';
6
+ import { allowRescaling, throwIfFalsy } from 'browser/renderer/shared/RendererUtils';
7
7
  import { TextureAtlas } from 'browser/renderer/shared/TextureAtlas';
8
8
  import { IRasterizedGlyph, IRenderDimensions, ITextureAtlas } from 'browser/renderer/shared/Types';
9
9
  import { NULL_CELL_CODE } from 'common/buffer/Constants';
@@ -281,14 +281,7 @@ export class GlyphRenderer extends Disposable {
281
281
  // Reduce scale horizontally for wide glyphs printed in cells that would overlap with the
282
282
  // following cell (ie. the width is not 2).
283
283
  if (this._optionsService.rawOptions.rescaleOverlappingGlyphs) {
284
- if (
285
- // Is single cell width
286
- width === 1 &&
287
- // Glyph exceeds cell bounds, + 1 to avoid hurting readability
288
- $glyph.size.x > this._dimensions.device.cell.width + 1 &&
289
- // Never rescale emoji
290
- code && !isEmoji(code)
291
- ) {
284
+ if (allowRescaling(code, width, $glyph.size.x, this._dimensions.device.cell.width)) {
292
285
  array[$i + 2] = (this._dimensions.device.cell.width - 1) / this._dimensions.device.canvas.width; // - 1 to improve readability
293
286
  }
294
287
  }