Replies: 6 comments
-
interesting! is this a recent addition to libunistring? how fast is it? do we expect |
Beta Was this translation helpful? Give feedback.
-
if this fixed up the |
Beta Was this translation helpful? Give feedback.
-
one thing to remember is we don't want some Platonic width. ideally we would get the width as emitted by the font stack, since that's what truly decides it. since we can't get that via any means of which i'm aware, the next best thing is the width as the terminal thinks, so that we're on the same page/plane. which i suspect is more likely to be |
Beta Was this translation helpful? Give feedback.
-
i see no |
Beta Was this translation helpful? Give feedback.
-
I don't think so. But, they have a crazy build, so I don't know when it was introduced.
It really doesn't seem like it's going to be fixed since it's been like this for quite a few years. The test program below uses https://www.compart.com/en/unicode/U+2705, which was added in 2010.
Some of my users were complaining in here -- tstack/lnav#1134 They're complaining about the version of lnav that uses ncurses. I think if Here is a simple test program:
On macos 15.2, the output looks like the following in Terminal.app:
It's |
Beta Was this translation helpful? Give feedback.
-
ahhh indeed thanks
|
Beta Was this translation helpful? Give feedback.
-
The
wcwidth()
implementation on macos is ancient and doesn't recognize many emojis. It looks like notcurses is already linking with libunistring and there is auc_width()
(and related) functions for computing the width. It might be worth investigating using that instead.(I made the switch in my local copy of notcurses and it seems to work. But, be warned that libunistring has their own "stdint.h" that does a
#define in32_t
that really screws the world up. So, including the "uniwidth.h" header in "notcurses.h" will wreck some stuff.)Beta Was this translation helpful? Give feedback.
All reactions