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]Certain ttf files dont work with Qt, on ARM machine
Forum Updated to NodeBB v4.3 + New Features

[Solved]Certain ttf files dont work with Qt, on ARM machine

Scheduled Pinned Locked Moved Mobile and Embedded
13 Posts 2 Posters 3.3k 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.
  • D Offline
    D Offline
    debugger
    wrote on 25 Sept 2013, 14:09 last edited by
    #1

    Hi all,

    I am a beginner in Qt. Trying to develop an application to support multiple languages in Qt(on ARM machine). I tried loading some ttf files, which gave some junk display, while some gave BOXes, some gave correct and required output. Why does this happen? I haven't changed my application. Only the ttf files, their resource file names and family font names are changed, wherever needed.

    @QFile fontFile("katakana.ttf");@

    @QFont font3("Katakana", 25, QFont::Bold, true);@

    Any pointers are appreciated...

    Thanks in advance.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 25 Sept 2013, 15:01 last edited by
      #2

      Hi,

      Are you sure you have the file installed at the right place when loading them ?

      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
      • D Offline
        D Offline
        debugger
        wrote on 26 Sept 2013, 04:26 last edited by
        #3

        @SGaist..

        Hi,

        Thanks for your reply...

        I've installed them in /usr/local/Qt/lib/fonts, from where it takes font files...

        May I know if that a wrong place to keep the font files...

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 26 Sept 2013, 07:55 last edited by
          #4

          Seems all right, could you verify what QFontDatabase::families() return ?

          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
          • D Offline
            D Offline
            debugger
            wrote on 26 Sept 2013, 08:45 last edited by
            #5

            Hi SGaist,

            It returns all pre-installed fonts and those which I've installed for my application... But the application works with some of the fonts and not with some others... If the issue was with font file location, none of them should work,right???

            1 Reply Last reply
            0
            • S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 1 Oct 2013, 22:16 last edited by
              #6

              Indeed, do you have FontConfig installed properly on your target ?

              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
              • D Offline
                D Offline
                debugger
                wrote on 3 Oct 2013, 04:38 last edited by
                #7

                Can you please tell me how do I check it?? I've read about it while searching for a solution... But not clear about what to do with that.. Can you please explain its function?

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on 3 Oct 2013, 07:43 last edited by
                  #8

                  First thing is to check that it's been compiled. Look at the summary after you called configure when cross-compiling Qt.

                  Then it depends on your target OS, which is it ?

                  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
                  • D Offline
                    D Offline
                    debugger
                    wrote on 3 Oct 2013, 10:46 last edited by
                    #9

                    OS used is Embedded Linux.

                    I'll verify if fontcofig has been compiled or not and let you know.
                    Can you please explain me what does it do?

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on 3 Oct 2013, 12:23 last edited by
                      #10

                      Embedded Linux is a bit vast, is it debian, openembedded, a custom built system etc... ?

                      The "fontconfig site":http://www.freedesktop.org/wiki/Software/fontconfig/ covers that well :)

                      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
                      • D Offline
                        D Offline
                        debugger
                        wrote on 4 Oct 2013, 09:03 last edited by
                        #11

                        Thank you so much SGaist.

                        Its a custom-built one...

                        1 Reply Last reply
                        0
                        • S Offline
                          S Offline
                          SGaist
                          Lifetime Qt Champion
                          wrote on 4 Oct 2013, 09:21 last edited by
                          #12

                          You're welcome

                          Then you need to add fontconfig to your build and also check that your Qt builds the support for it

                          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
                          • D Offline
                            D Offline
                            debugger
                            wrote on 9 Oct 2013, 09:28 last edited by
                            #13

                            :) thats done..it works fine...

                            1 Reply Last reply
                            0

                            2/13

                            25 Sept 2013, 15:01

                            topic:navigator.unread, 11
                            • Login

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