libvte cannot display surrogate pair double width characters properly.

This commit is contained in:
Christopher Jeffrey 2015-04-15 10:44:44 -07:00
parent c5e5ed86f6
commit cb363c575b
2 changed files with 8 additions and 2 deletions

View File

@ -269,7 +269,9 @@ The screen on which every other node renders.
display text above the basic multilingual plane. this is behind an option
because it may affect performance slightly negatively. without this option
enabled, all double-width and surrogate pair characters will be replaced by
`??` and `?` respectively.
`??` and `?` respectively. (NOTE: libvte (e.g. gnome-terminal) cannot display
characters that are both surrogate pairs _and_ double-width properly. there
is no way for blessed to fix this unfortunately).
These border-overlapped elements:

View File

@ -79,7 +79,11 @@ var lorem = 'Non eram nescius Brute cum quae summis ingeniis exquisitaque'
+ ' legantur';
lorem = lorem.replace(/e/gi, DOUBLE);
lorem = lorem.replace(/a/gi, SURROGATE_DOUBLE);
// NOTE: libvte breaks when trying to display
// this surrogate pair double width character:
if (process.argv[2] !== 'vte') {
lorem = lorem.replace(/a/gi, SURROGATE_DOUBLE);
}
lorem = lorem.replace(/o/gi, SURROGATE_SINGLE);
var main = blessed.box({