Details
-
Bug
-
Resolution: Done
-
P2: Important
-
4.7.1
-
None
-
Tested on OS X 10.6 carbon and cocoa builds of Qt.
-
-
c501403cb5a0c9ec21b00e0c2f640ae85566e0cf
Description
Qt doesn't seem to check if all the characters in a string are of the requested font.
This results in incorrect display of characters that are higher in the substituted font than the selected font.
This is a problem for a number of common fonts, for example helvetica, when trying to show combined latin and CJK characters results in clipping of the non latin characters, as shown in example below:
#include <QtGui> class W : public QWidget{ public: W(){ layout = new QVBoxLayout; l1 = new QLabel(QString::fromUtf8("OK 書体")); l1->setFont(QFont("Lucida Grande",24)); layout->addWidget(l1); l2 = new QLabel(QString::fromUtf8("Not OK 書体")); l2->setFont(QFont("Helvetica",24)); layout->addWidget(l2); setLayout(layout); }) private: QVBoxLayout *layout; QLabel * l1; QLabel * l2; }; int main( int argc, char** argv ) { QApplication app( argc, argv ); W w; w.show(); return app.exec(); }