wineconsole: Correctly handle TrueType font widths

Akihiro Sagawa sagawa.aki at gmail.com
Mon Nov 7 09:25:03 CST 2016


On Sun, 6 Nov 2016 22:56:17 +0000, Hugh McMaster wrote:
> I agree that wineconsole should have two modes, but I'm not sure we need special handling for full width
> characters in Western locales. Actually, I'm interested to find out how many full-width characters are in
> SBCS locales.
> 
> How can we know whether a DBCS character needs one or two cells for rendering?
SBCS mode:
My test shows even Kanji characters use a one cell in SBCS console
buffer. Thus, I guess no character occupies two cells. However, Kanji
glyph has twice width of ASCII character. So, we need to consider them.

DBCS mode:
ASCII characters and half-width Katakana characters need one cell
 buffer. Others, such as Kanji, need two cell buffers. Please note some
symbols in ISO-8859-1 (e.g. multiplication sign) use two cell buffers in
DBCS mode.
There is a font glyph issue, too. For instance, fixed-pitch Western font
is designed multiplication sign as the same width as ASCII character (as
seen in ISO-8859-1). But, it should have as the same width as Kanji for
DBCS mode. It could be possible to reject Western-style font for DBCS
console.

> We may also want to consider dropping support for the (n)curses backend as part of a broader wineconsole
> update.
Using ncursesw is another option though it requires wchar_t...




More information about the wine-devel mailing list