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.
Regards, 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.
https://www.unicode.org/Public/11.0/udd/EasasianWidth.txt
This is a temporary patch. Please review if possible. It is also good to post more improved patch directly.
Thank you.