Details
-
Bug
-
Resolution: Cannot Reproduce
-
P3: Somewhat important
-
4.5.2, 5.2.0
-
None
Description
Product
Qt
Function
Painting
Version
4.5.2
Platform
Linux
Platform details
Debian unstable for x86, libqt4-dev 4.5.2-2
I also tested with http://qt.gitorious.org/qt/qt on 2009-09-21, I belive this problem stills exists.
Compilers
GCC
Compiler details
GCC 4.3.3-9 shipped with Debian unstable.
Subject
Chinese comma in simplified Chinese fonts from Adobe Reader can't be rendered properly
Steps to reproduce / test case
1. modify the example examples/assistant/simpletextviewer that shipped with Qt 4
//// code snippet begin
//// make Help -> About menu item trigger this code snippet.
QFont f;
f.setFamily(QString::fromUtf8("Adobe 仿宋 Std R"));
textEdit->selectAll();
textEdit->currentFont(f);
//// code snippet end
2. put the fonts from Adobe into ~/.fonts (See below for the way to get these fonts)
3. build and run it, copy this string "中,文" and paste it into the text box.
NOTICE: the comma is a Chinese comma "," not an English comma ",".
4. select Help->About to change the font.
Expectation: the chinese comma between two chinese characters ocuppies one
chinese character width.
Result: the chinese comma between two chinese characters ocuppies half chinese
character width, this make it difficult to read and is ugly.
These fonts can be obtained from Adobe Reader Simplified Chinese version
and other softwares from Adobe, I obtained them from these links (it's not
legal, but i think it's ok for testing purpose):
Adobe Kaiti (Adobe 楷体 Std R)
http://www.rayfile.com/files/99406663-e3a7-11dd-96cc-0014221b798a/
Adobe Fangsong (Adobe 仿宋 Std R)
http://www.rayfile.com/files/bec75a9c-e3a6-11dd-a45c-0014221b798a/
AdobeSongStd-Light (Adobe 宋体 Std L)
http://www.rayfile.com/files/50ce7bfa-e55a-11dd-907a-0019d11a795f/
AdobeHeitiStd-Regular (Adobe 黑体 Std R)
http://www.rayfile.com/files/267d504f-e55b-11dd-8b4d-0014221b798a/
More information
Other chinese fonts like simsun (shipped with MS Windows Simplified Chinese version)
and uming (http://packages.debian.org/sid/ttf-arphic-uming) are ok with Qt.
Freetype renders all these fonts properly using libgd-gd2-perl or GVIM 7.2.
The attachment contains some pictures drawed by libgd-gd2-perl and Qt 4.5.2.
Use "perl font.pl FONT-NAME" to execute the Perl scripts contained in the
attachment, the font name is obtained with 'fc-list |grep -i adobe', for
example "Adobe 仿宋 Std R".