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. How to show Thailand characters in Qt
Forum Updated to NodeBB v4.3 + New Features

How to show Thailand characters in Qt

Scheduled Pinned Locked Moved Mobile and Embedded
13 Posts 3 Posters 4.5k Views 1 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.
  • K Offline
    K Offline
    kumararajas
    wrote on last edited by
    #4

    Hi Houmingc,

    Can you check if you have "Thai" font in your embedded target?

    One example would be: In my embedded target, I could not see the chinese characters. And I could see only "boxes". Then after adding the right font to the right place, I can see the chinese characters.

    --Kumar

    1 Reply Last reply
    0
    • H Offline
      H Offline
      houmingc
      wrote on last edited by
      #5

      This is the most logical to-do list.
      I have done it but still not working.

      A text-label has different font type. it is currently set as A[Ubuntu,20]
      downloaded font is blk-bangli-ko-sa-na, blk-suphanburi. Any new suggestion. thanks

      1 Reply Last reply
      0
      • K Offline
        K Offline
        kumararajas
        wrote on last edited by
        #6

        If I understand correctly,

        You have downloaded the right font. But the application is using "Arial". Usually, as per my observation, if the correct font has not been set, then Qt would load the default font.

        From the behaviour, it looks like, the font is not set.

        Can you try setting the font by yourself

        @
        QFont newFont("Courier", 8, QFont::Bold, true);
        QApplication::setFont(newFont);
        @

        --Kumar

        1 Reply Last reply
        0
        • H Offline
          H Offline
          houmingc
          wrote on last edited by
          #7

          i try below and still not working. What does the below Statement do ???

          @

          ui->setupUi(this);
          QFont newFont("blk-bangli-ko-sa-na", 8, QFont::Bold, true);
          QApplication::setFont(newFont);
          @

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

            Hi,

            Are you sure you put the font in the proper place ? You can use QFontDabase to get more information and depending on your needs setup your Thaï font for your application.

            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
            • H Offline
              H Offline
              houmingc
              wrote on last edited by
              #9

              In mainwindow.ui, have set label Font(family) to blk-bangli-ko-sa-na.
              I am confused, thai character still not showing.

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

                Did you check that your font can be found like already suggested ?

                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
                • H Offline
                  H Offline
                  houmingc
                  wrote on last edited by
                  #11

                  How get professional help :>

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

                    Buy a Qt license or get in touch with The Qt Company, KDAB, ICS to make a contract.

                    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
                    • K Offline
                      K Offline
                      kumararajas
                      wrote on last edited by
                      #13

                      As Sam mentioned, QFontDatabase can help you to get more information on the fonts. That will help you to be sure on the font that you are using.

                      "Font familes":http://qt-project.org/doc/qt-4.8/qfontdatabase.html#families

                      --Kumar

                      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