@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/lib/addon-webgl.js +1 -1
- package/lib/addon-webgl.js.map +1 -1
- package/package.json +1 -1
- package/src/GlyphRenderer.ts +2 -9
package/package.json
CHANGED
package/src/GlyphRenderer.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @license MIT
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import {
|
|
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
|
}
|