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. Increase font size on target board using Qt for Embedded Linux
Forum Updated to NodeBB v4.3 + New Features

Increase font size on target board using Qt for Embedded Linux

Scheduled Pinned Locked Moved Solved Mobile and Embedded
8 Posts 2 Posters 2.3k 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.
  • ssEmbedS Offline
    ssEmbedS Offline
    ssEmbed
    wrote on last edited by
    #1

    Hi, I'm developing with Qt for Embedded Linux and Qt 4.7.1 on Linux and I'm cross compiling for an ARM board with Digi som. On the Qt application that runs on the ARM board using Digi ESP for embedded Linux, I need some QLabels with large fonts (I set to 48pt on the QtDesigner), but when I load the executable on the ARM board those fonts are not as large as I see them on the QtDesigner interface (and on my Linux PC), and even if I set a bigger font size, when I run the application on the board, the fonts have always the same size (as if it were reached a maximum font size or as if the font does not support that size).

    I have tried everything from makeqpf (which does not compile) to build qt with freetype but nothing seems to work and I need some urgent help with this.

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

      Hi and welcome to devnet,

      You can also set the font size of your widget directly in your code.

      QFont font = ui->myLabel->font();
      font.setPointSize(48);
      ui->myLabel->setFont(font);
      

      Note that Qt 4.7.1 is pretty outdate so if you can't migrate to Qt 5, consider to move to 4.8.7

      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
      1
      • ssEmbedS Offline
        ssEmbedS Offline
        ssEmbed
        wrote on last edited by ssEmbed
        #3

        Hi, thank you for the reply. My code currently states the fontsize is set to 48. (font.setPointSize(48)). But the target is not able to display a 48 font size. The maximum it displays is 24. Has it got to do with the fact that my target's qt/lib/fonts folder has Helvetica_240_80.qpf as the largest font, which is why the font size does not go beyond 24? If so, how do I fix that? I am thinking about migrating to Qt 4.8.

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

          You can use makeqpf to generate the font files you need.

          See here for more information about Qt Embedded fonts.

          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
          • ssEmbedS Offline
            ssEmbedS Offline
            ssEmbed
            wrote on last edited by ssEmbed
            #5

            Like I previously mentioned in my question, my makeqpf does not compile. It fails to run on my host linux x86 pc (since the binary is arm). Hence I am not able to use that tool for creating qpf fonts. I have searched everything on the internet for makeqpf tool and also built Qt with freetype to support Truetype fonts, but with no luck.

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

              Doesn't build and doesn't run are not the same thing.

              Build it with your desktop Qt.

              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
              • ssEmbedS Offline
                ssEmbedS Offline
                ssEmbed
                wrote on last edited by
                #7

                I set the environment variable called "QWS_DISPLAY" on my target board with the correct width and height and that solved the font problem. Thank you for helping me!

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

                  Glad you found out and thanks for sharing.

                  Since you have it working now, please mark the thread as solved using the "Topic Tool" button so that other forum users may know a solution has been found :)

                  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

                  • Login

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