Fix rendering issues for emojis that come out as wide chars

The fix is to disallow non-single cell width chars to be overlapping
This commit is contained in:
Daniel Imms
2017-09-30 07:54:52 -04:00
parent fa86f31f36
commit 3e29a03f87
+7 -2
View File
@@ -183,10 +183,15 @@ export class TextRenderLayer extends BaseRenderLayer {
}
/**
* Whether a character is overlapping to the
* next cell.
* Whether a character is overlapping to the next cell.
*/
private _isOverlapping(charData: CharData): boolean {
// Only single cell characters can be overlapping, rendering issues can
// occur without this check
if (charData[CHAR_DATA_WIDTH_INDEX] !== 1) {
return false;
}
// We assume that any ascii character will not overlap
const code = charData[CHAR_DATA_CODE_INDEX];
if (code < 256) {