wineconsole: Correctly handle TrueType font widths

Akihiro Sagawa sagawa.aki at gmail.com
Thu Nov 3 11:00:26 CDT 2016


On Thu, 3 Nov 2016 08:37:45 +0000, Hugh McMaster wrote:
> Do you know if there is a way to detect Kanji and similar fonts, so we
> can set the cell width appropriately? Obviously, it would be best to
> fix wineconsole's DBCS support, but until then, we might be able to find a
> workaround that handles character width for all languages.

I have questions. How DBCS characters is rendered with our
implementation? Do they use double columns, or single column?
AFAIK, on native Western console, all characters are rendered in a single
column and Kanji is shown as a white square box. However, in Japanese
locale, Kanji uses two columns (as described in the previous mail).

IMHO, wineconsole should have two mode: SBCS mode and DBCS one. The mode
depends on console codepage. As a workaround for Western font issue, I
suggest wineconsole uses tmAvgCharWidth for cell width and ignores (or
replaces) full-width characters by using GetCharacterType and
C3_FULLWIDTH *only* for SBCS locales. So, this will be the first step of
SBCS mode.

What do you think about my idea?

Regards,
Akihiro Sagawa




More information about the wine-devel mailing list