Hello,

I'm having problems using chinese .ttf font (on Symbian Device using Qt4.7.3, Nokia N8) As I didn't get any solving answers in the newbie forum, maybe you can help me?

When I load a "standard" font like Arial, it works. Loading a Chinese Font doesn't work.

Qt Code:
  1. MainWindow::MainWindow(QWidget *parent)
  2. : QMainWindow(parent), ui(new Ui::MainWindow)
  3. {
  4. QFileDialog dialog(this);
  5. dialog.setFileMode(QFileDialog::ExistingFile);
  6. QString fileName;
  7. fileName = dialog.getOpenFileName(this);
  8. qDebug()<<QFontDatabase::addApplicationFont(fileName);
  9. //qDebug displays 0 for Arial.ttf, but -1 for chinese.ttf (not the real font Name)
  10. bool ok;
  11. QApplication::setFont(QFontDialog::getFont(&ok,this));
  12. //**see below
  13. ui->setupUi(this);
  14. }
To copy to clipboard, switch view to plain text mode 
**As a consequence the font Dialog has Arial in its font list and returns true when selecting it, but not the chinese one.

-The fonts are located in the same directory.
-I got both fonts from the Windows Font Directory
-I tried 3 different chinese fonts, so I don't think the problem is related to a damaged font file.

I just found similar threads about addApplicationFont not working at all. But as it works for some fonts I don't know what I did wrong.

Thanks,
Chris