[dev] [st] macOS: Wide Asian Glyphs

From: Gary Allen Vollink <gary_AT_vollink.com>
Date: Thu, 14 Sep 2017 12:01:42 -0400


I'm absolutely new here. If I'm breaking protocols, I'm sorry. 3 Items.

1) I tried to use the 'get' command to respond to an e-mail from a few
days ago, but nothing was returned. ...I ran into an issue that may
have happened to others... I found a font that was improperly
installed, readable only by root. Segfault 11 when run by a user.
This seems due to the following being uncaught. Anyway, it looked
similar to a few other reports about crash on font change.

  frc[frclen].font = XftFontOpenPattern(xw.dpy,
+ if ( NULL == frc[frclen].font ) {
+ die( "Unexpected NULL on XftFontOpenPattern" );
+ }

2) I ran into an issue where wcwidth was not returning a wide result
for ANYTHING under x.c: setlocale(LC_CTYPE, ''). Tested Japanese,
Korean and Simplified Chinese. Changing that to (LC_ALL,
"en_US.UTF-8") fixed it, meaning wcwidth knows what to do, (but it is
probably the wrong way to fix it). I noticed another e-mail in the
archives from last year where someone else had to setlocale TO
LC_CTYPE to get it to work for THEM. Maybe better as a macro in
config.def.h, but I'm not familiar enough with the way you do things
to just assume. (I assume LC_CTYPE always works fine on Linux)
Either way, I'm hoping that this might help someone else - even if
while reading the archive via web search.

3) I'm not proud of this, but it works reliably. I wrote a nasty hack
that force-fixes the width/overlap problem with Emoji (and some other
odd font-substitution problems). I know that this is 'fixed' in
glibc's most recent release - following UNICODE recent guidance that
all Emoji are double-width, but it isn't fixed on macOS (Emoji without
spaces don't even work right in Terminal.app). Anyway, it is
something I could throw together as a diff - sub 40 lines. I don't
have a handle on what the protocol is for sharing such a thing.

Gary Allen Vollink
Received on Thu Sep 14 2017 - 18:01:42 CEST

This archive was generated by hypermail 2.3.0 : Thu Sep 14 2017 - 18:12:26 CEST