Friday, March 19, 2010

Appendix for Qt 4.7 Technology Preview is released

If you are CJK font user, and its font has incorrect behavior for "Global Advance Width", phosphorescence: Qt 4.7 Technology Preview is released is not enough. The width of glyphs is too wide for ASCII characters. It's me too.

There are hints in Japanese Qt mailing list. I try to summarize and translate to English, to fix the width of glyphs correctly, we should set FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH on in corresponding source. For instance, at Qt 4.7 Technology Preview, We set at once in src/gui/text/qfontengine_ft.cpp file:

qfontengine_ft.cpp.diff
622c622
< default_load_flags = 0;
---
> default_load_flags = FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH;

Then I rebuild Qt 4.7 Technology Preview, and succeed with correct font width.

No comments:

Post a Comment