Get width of emoji/combined chars

This commit is contained in:
Daniel Imms
2022-08-27 06:38:15 -07:00
parent e76918eddc
commit 4ecc098de4
@@ -438,9 +438,11 @@ export class WebglCharAtlas implements IDisposable {
// underline colors to prevent important colors could get cleared. // underline colors to prevent important colors could get cleared.
let enableClearThresholdCheck = !powerlineGlyph; let enableClearThresholdCheck = !powerlineGlyph;
let chWidth: number = 1; let chWidth: number;
if (typeof codeOrChars === 'number' && (underline || strikethrough)) { if (typeof codeOrChars === 'number') {
chWidth = this._unicodeService.wcwidth(codeOrChars); chWidth = this._unicodeService.wcwidth(codeOrChars);
} else {
chWidth = this._unicodeService.getStringCellWidth(codeOrChars);
} }
// Draw underline // Draw underline