From cb363c575b666bb7ee03c7f8d8d948d5c1cc4a95 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Wed, 15 Apr 2015 10:44:44 -0700 Subject: [PATCH] libvte cannot display surrogate pair double width characters properly. --- README.md | 4 +++- test/widget-eaw.js | 6 +++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8fbd044..18be3b9 100644 --- a/README.md +++ b/README.md @@ -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: diff --git a/test/widget-eaw.js b/test/widget-eaw.js index 39c5a52..c860278 100644 --- a/test/widget-eaw.js +++ b/test/widget-eaw.js @@ -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({