Results 1 to 2 of 2

Thread: Problem with chinese and japanese characters display

  1. #1
    Join Date
    May 2007
    Posts
    106
    Thanked 3 Times in 3 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Symbian S60

    Question Problem with chinese and japanese characters display

    Hi folks,

    I am changing language for my application dynamically. The language does get changed, English or German are shown perfectly. It loads corresponding translation files but I have a problem with displaying the chinese and japanese fonts on my target device. When I run my application on Linux machine, it displays all the fonts correctly, but when I run the same program with the Qt Embedded it is not displaying anything for Chinese and Japanese languages.

    Here follows the code to load translators:
    Qt Code:
    1. void FormMainWindow::changeEvent(QEvent *event)
    2. {
    3. if (event->type() == QEvent::LanguageChange)
    4. retranslateUi(this);
    5. else
    6. QWidget::changeEvent(event);
    7. }
    8.  
    9. void FormMainWindow::on_radioButtonGroup_buttonClicked(int id)
    10. {
    11. switch(id)
    12. {
    13. case 1:
    14. translator.load(":/Language/TestDVR_en");
    15. break;
    16. case 2:
    17. translator.load(":/Language/TestDVR_ch");
    18. break;
    19. case 3:
    20. translator.load(":/Language/TestDVR_jp");
    21. break;
    22. case 4:
    23. translator.load(":/Language/TestDVR_de");
    24. break;
    25. }
    26. qApp->installTranslator(&translator);
    27. }
    To copy to clipboard, switch view to plain text mode 

    The complete trolltech folder is deployed on /usr/local/Trolltech on my target device and application links to the same. QTDIR/lib/fonts directory on my desktop (where I develop and it is running fine) and on my target device (Qt for embedded linux) seems to be the same. I am not sure if I have to deploy some font file and load it using qApp->setFont() or do something else. I have googled a lot and searched through QtCentre forums as well.

    Please provide me with some pointers. Thanks in advance.

    Regards,
    Manoj

  2. #2
    Join Date
    May 2007
    Posts
    106
    Thanked 3 Times in 3 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Symbian S60

    Exclamation Re: Problem with chinese and japanese characters display

    I downloaded MSGOTHIC.TTF and put it to QtDir/lib/fonts and it started showing up Japanese characters properly. I tried putting HDZB_5.TTF also but Chinese characters are still not coming up!!

Similar Threads

  1. QTextEdit and Chinese characters on a Mac
    By jupi32000 in forum Qt Programming
    Replies: 0
    Last Post: 17th February 2010, 01:02
  2. S60 and "addFont" problem (Chinese characters)
    By Lykurg in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 6th January 2010, 20:58
  3. How to display chinese chars with QtEmbedded-4.5.3
    By amaolei in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 15th December 2009, 06:47
  4. Problem with korean characters display
    By giriprasad in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 27th September 2009, 08:40
  5. how can I input and display Chinese using QT4?
    By Justin_W in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 12th August 2008, 17:46

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.