wineconsole: Correctly handle TrueType font widths

Alexandre Julliard julliard at winehq.org
Wed Nov 2 09:21:35 CDT 2016


Akihiro Sagawa <sagawa.aki at gmail.com> writes:

> On Tue, 1 Nov 2016 11:59:30 +0000, Hugh McMaster wrote:
>> -    config->cell_width  = tm.tmMaxCharWidth;
>> +    if (tm.tmPitchAndFamily & (TMPF_VECTOR | TMPF_TRUETYPE))
>> +        config->cell_width = tm.tmAveCharWidth;
>> +    else
>> +        config->cell_width = tm.tmMaxCharWidth;
>> +
>
> Hi Hugh,
>
> Why don't you use tmAveCharWidth value for raster (bitmap) fonts?
> Japanese fixed-pitch bitmap font, such as FixedSys (jvgafix.fon) or Terminal
> (not avaialble in wine), has a half value of tmMaxCharWidth for
> tmAveCharWidth. In other words, FixedSys shows tmAveCharWidth = 8,
> tmMaxCharWidth = 16.
> This works good in DBCS console window because full-width character (e.g.
> Kanji) occupies two cells.

That's how it's supposed to work, but that's not how it works at the
moment. We display one char per cell, so if you use tmAveCharWidth,
Kanji overlap each other.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list