[PATCH v2 7/7] gdi32: Improve the determine code whether the chracter is the fullwidth.
bsjeon at hanmail.net
Fri Feb 1 14:11:58 CST 2019
Byeongsik Jeon wrote:
> Akihiro Sagawa wrote:
>> In my opinion, why don't we test the following condition for fixed_pitch_full?
>> fixed_pitch_full = avg_advance > 0
>> && (base_advance + 63) >> 6
>> >= pFT_MulFix(MulDiv(incoming_font->ntmAvgWidth, x, y), em_scale);
>> The x and y are heuristic ratio. I think they will be 1.5~1.8.
>> Because base_advance can be based on linked font, i.e. another font
>> replaced by get_glyph_index_linked(), the glyph might be a proportional
>> typeface. In that case, "(base_advance + 63) >> 6 != avg_advance" is
>> very loose restriction. A narrow character may be treated as a
>> Full-width character in that case.
>> Akihiro Sagawa
> Yes. It's absolutely correct.
I looked at the behavior on Windows with a test font that manipulated
the OS/2 table(Panose, AvgCharWidth). It didn't work as I thought. IMO,
Windows seems to be doing something related to the following document.
Surprisingly, Wine already has the scripts needed for conversion, so I
can work easily.
This is a temporary patch. Please review if possible. It is also good to
post more improved patch directly.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 30199 bytes
Desc: not available
More information about the wine-devel