Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. [Solved] Arm Linux Qt5.3.2 checklist to support simplified chinese?
Forum Updated to NodeBB v4.3 + New Features

[Solved] Arm Linux Qt5.3.2 checklist to support simplified chinese?

Scheduled Pinned Locked Moved Mobile and Embedded
5 Posts 2 Posters 1.4k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jeff Andle
    wrote on last edited by Jeff Andle
    #1

    When I debug my app under Ubuntu it displays Chinese characters OK. However under Arm/Linux it displays empty boxes. I conditionally load a simplified Chinese ttf or DejaVu Serif, depending on a setting.

    1. I have a set of ttf's for DejaVu but a single file for SimpChinese.ttf (really DFSong1B-GB).
    2. I have none nothing for the locale, etc.
    3. If I knew what else to try I'd be better off :)

    (SimpChinese.ttf (really DFSong1B-GB) was not loading proper unicode mapping...)

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Might be a silly question but did you check that the font is loaded successfully ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • J Offline
        J Offline
        Jeff Andle
        wrote on last edited by
        #3

        @SGaist - I am just starting to implement and debug it. All I know is that I set FontFamily to the name (absent ttf file extension) and the font ttf file is in the same directory that does launch. It occurs to me that "DFSong1B-GB" is probably the font family despite my renaming the file.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Are you using QFontDatabase ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • J Offline
            J Offline
            Jeff Andle
            wrote on last edited by
            #5

            I am simply using QFont to load a font. The problem was that the font I installed on the device did not support Unicode, I guess. I put unifont on the device and it works.

            I am now down to legibility issues at the 10-12 pixel size allocations in the device. That is sufficient for Latin ASCII but not enough for Hanzi. I am looking for a better font face and balancing light/bold/etc. for readability.

            QFont fontBold;
            switch (HMI_settings.u16TextLang)
            {
            default:
                fontBold.setFamily((FontName)); //(QStringLiteral)
                break;
            
            case Lang_SimpChinese:
                break;
            }
            
            printf ("%s\n", FontName.toLatin1().constData());
            fontBold.setPixelSize(12*HMI_SCALE);
            fontBold.setBold(true);
            fontBold.setItalic(false);
            fontBold.setWeight(75);
            fontBold.setStyleStrategy(QFont::PreferAntialias);
            
            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved