Details
-
Bug
-
Resolution: Done
-
Not Evaluated
-
5.3.1
-
None
-
OS: Archlinux
Qt version: Qt 4.8.6 and Qt 5.3.1
Desktop Environment: KDE 4.13
-
461c2b20044359b80df8217a7565c7b8a60a1f0b
Description
Adobe announced a new set of fonts called Source Han Sans ( http://sourceforge.net/adobe/source-han-sans/wiki/Home/ ). Weights of Full-width CJK punctuations should be same as a single character but Qt 4.8.6 and Qt 5.3.1 (downloaded from qt-project.org) show them in half-width with this font family.
Here is a picture that explains the issue quite well. It shows Qt 4.8.6 and official Qt 5.3.1 (downloaded from qt-project.org) wrongly rendered it but Qt 5.3.1 from Archlinux repository can do it right.
According to Dr. Ken Lunde from Adobe, this may because Qt invoked 'kern' GPOS feature automatically. However, 'pwid' feature should also be invoked with 'kern' but actually not. Then punctuations fallback to half width via 'palt' GPOS feature. Fonts without 'kern' and 'palt' don't affected by this issue.
Please see here for more information: https://github.com/adobe-fonts/source-han-sans/issues/37
Code for repeating this bug:
/* main.cpp */ #include <QApplication> #include <QWidget> #include <QLabel> #include <QFont> #include <QString> int main(int argc, char *argv[]) { QApplication app(argc, argv); QWidget window; QLabel label(QString::fromUtf8("中?文!标《点。"), &window); QFont qf("Source Han Sans CN"); // Here I used CN version of that font. label.setFont(qf); window.show(); return app.exec(); }
Thanks for tracking this bug.