[PATCH] gdi32: Adjust a fixed-pitch full-width character has double advance of a half-width character. (try 5)

Akihiro Sagawa sagawa.aki at gmail.com
Thu Jan 24 10:22:59 CST 2013


This patch enhances full-width character glyph advance when we choose
fixed-pitch font.

Windows 2000 (or XP for Japanese) and later adjust fixed-pitch
full-width character glyph advances so that two half-width characters'
advance equals to one full-width character's advance.  Because CJK
fixed-pitch font, such as MS Gothic, is designed as full-width character
(e.g. Kanji) has a double advance of half-width character (e.g. ASCII)
and many developpers expect that.

Please refer Microsoft document KB 417434 [1] and white paper [2] for

[1] ... http://support.microsoft.com/kb/417434/ja (written in Japanese)
[2] ... http://msdn.microsoft.com/ja-jp/library/cc979401.aspx (written in Japanese)

try 5:
 - Add patch description above.
 - Fix avgAdvance's rounding method. (as in get_outline_text_metrics)
 - Refine a commit message, "Ensure" to "Adjust" and "double width" to
   "double advance".

try 4:
 - Fix full-width character detection that causes test failure.

try 3:
 - Improve full-width character detection.
 - Support fake italic transformation.
 - Choose non-linked fonts in the test case.
 - Add more trace messages.

try 2:
 - Add rotated transformation tests.

Akihiro Sagawa

 dlls/gdi32/freetype.c   |   37 ++++++++++++++++++--
 dlls/gdi32/tests/font.c |   87 +++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 121 insertions(+), 3 deletions(-)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-gdi32-Ensure-a-fixed-pitch-full-width-character-has-.patch
Type: text/x-patch
Size: 7442 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20130125/f0ee4205/attachment-0001.bin>

More information about the wine-patches mailing list