This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM335x, Linux. How to do? Japanese and Chinese characters.

hello,
Does anyone know a way to display Japanese and Chinese characters on the AM335x board, Linux? By default, the font appears to be not installed. In my Qt software no signs are there to see. Other languages ​​such as Russian and Spanish work.

Are there any tools to allow safe re-installation of additional fonts or do you simply manually?

  • QTextCodec::setCodecForCStrings(QTextCodec::codecForLocale());
          QTextCodec::setCodecForTr(QTextCodec::codecForLocale());
          QString qString1 = tr("鳶尾花");
          QByteArray byteArray = qString1.toUtf8();
          const char* cString = byteArray.data();
          QString qString2 = QString::fromUtf8(cString);
          QTextCodec::setCodecForTr(QTextCodec::codecForName(cString));
          ui->txtFirstname->setText(qString2);

    this snap code may help you.

    Best luck

  • I did a manual copy.

    1. copy a chinese or japanese TT font into sd card's filesystem at /usr/lib/fonts.  One such font is AR PL KaitiM Big5

    2. Create a simple program in QT creator and select the font.  You may need to install the font in your Linux PC's font folder to preview it in QT creator.

            QFont font1;
            font1.setFamily(QString::fromUtf8("AR PL KaitiM Big5"));
            font1.setPointSize(40);
            label_3->setFont(font1);

  • for that you need to use string codec like 

    QTextCodec :: setCodecForCStrings (QTextCodec :: codecForName ("XXXXXXX")); 

    there is awsm blog on this topic, this will definitely helps you.

    http://hi.baidu.com/dbzhang800/item/431f800fcb653e6dd55a1142

    best luck.