Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Font sizes too small on MacOS
Forum Updated to NodeBB v4.3 + New Features

Font sizes too small on MacOS

Scheduled Pinned Locked Moved Solved General and Desktop
7 Posts 2 Posters 1.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.
  • C Offline
    C Offline
    Creaperdown
    wrote on last edited by
    #1

    I am porting my application to MacOS but I noticed that the font size is very small compared to Linux and Windows.

    The fonts are embedded into the application and seem to be loaded correctly.

    Does someone have an idea why that might happen and what I could do to prevent this? Can I provide any other information?

    M 1 Reply Last reply
    0
    • C Creaperdown

      @mpergand Yes, I am setting my font sizes to 11-12 explicitly Qml.

      Why is a 12 pt size on linux like 10 pt on mac? Why doesnt it look the same and how could I fix that?

      M Offline
      M Offline
      mpergand
      wrote on last edited by
      #4

      @Creaperdown
      It's much better to rely on the default font size return by QFontDatabase.
      Call:
      QFontDatabase::systemFont(QFontDatabase::GeneralFont);
      and look at the font size.
      For me it is:
      QFont(.AppleSystemUIFont,13,-1,5,50,0,0,0,0,0)
      QFont(Ubuntu,10,-1,5,50,0,0,0,0,0)

      Usely on mac, 13 pt is the default font size, 11 pt is for small font size.

      C 1 Reply Last reply
      0
      • C Creaperdown

        I am porting my application to MacOS but I noticed that the font size is very small compared to Linux and Windows.

        The fonts are embedded into the application and seem to be loaded correctly.

        Does someone have an idea why that might happen and what I could do to prevent this? Can I provide any other information?

        M Offline
        M Offline
        mpergand
        wrote on last edited by
        #2

        @Creaperdown
        Do you set the size of this fonts explicitly ?
        A 12 point size on linux looks like a 10 point size on mac.

        C 1 Reply Last reply
        0
        • M mpergand

          @Creaperdown
          Do you set the size of this fonts explicitly ?
          A 12 point size on linux looks like a 10 point size on mac.

          C Offline
          C Offline
          Creaperdown
          wrote on last edited by
          #3

          @mpergand Yes, I am setting my font sizes to 11-12 explicitly Qml.

          Why is a 12 pt size on linux like 10 pt on mac? Why doesnt it look the same and how could I fix that?

          M 1 Reply Last reply
          0
          • C Creaperdown

            @mpergand Yes, I am setting my font sizes to 11-12 explicitly Qml.

            Why is a 12 pt size on linux like 10 pt on mac? Why doesnt it look the same and how could I fix that?

            M Offline
            M Offline
            mpergand
            wrote on last edited by
            #4

            @Creaperdown
            It's much better to rely on the default font size return by QFontDatabase.
            Call:
            QFontDatabase::systemFont(QFontDatabase::GeneralFont);
            and look at the font size.
            For me it is:
            QFont(.AppleSystemUIFont,13,-1,5,50,0,0,0,0,0)
            QFont(Ubuntu,10,-1,5,50,0,0,0,0,0)

            Usely on mac, 13 pt is the default font size, 11 pt is for small font size.

            C 1 Reply Last reply
            0
            • M mpergand

              @Creaperdown
              It's much better to rely on the default font size return by QFontDatabase.
              Call:
              QFontDatabase::systemFont(QFontDatabase::GeneralFont);
              and look at the font size.
              For me it is:
              QFont(.AppleSystemUIFont,13,-1,5,50,0,0,0,0,0)
              QFont(Ubuntu,10,-1,5,50,0,0,0,0,0)

              Usely on mac, 13 pt is the default font size, 11 pt is for small font size.

              C Offline
              C Offline
              Creaperdown
              wrote on last edited by
              #5

              @mpergand I see, thanks. Do you have any idea how or if I could get that default font size in qml?

              M 1 Reply Last reply
              0
              • C Creaperdown

                @mpergand I see, thanks. Do you have any idea how or if I could get that default font size in qml?

                M Offline
                M Offline
                mpergand
                wrote on last edited by
                #6

                @Creaperdown
                I don't know, I don't use qml.
                Maybe:
                Qt.font().pointSize

                1 Reply Last reply
                0
                • C Offline
                  C Offline
                  Creaperdown
                  wrote on last edited by
                  #7

                  Thanks, I'll find a way to get the default font and then base all my other fonts on it.

                  1 Reply Last reply
                  0
                  • C Creaperdown has marked this topic as solved on

                  • Login

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