Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. problem with font after deploys
Forum Updated to NodeBB v4.3 + New Features

problem with font after deploys

Scheduled Pinned Locked Moved Solved Installation and Deployment
12 Posts 2 Posters 1.6k 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.
  • SGaistS Offline
    SGaistS Offline
    SGaist
    Lifetime Qt Champion
    wrote on last edited by
    #2

    Hi and welcome to devnet,

    Did you forget to deploy your font with 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

    C 1 Reply Last reply
    0
    • SGaistS SGaist

      Hi and welcome to devnet,

      Did you forget to deploy your font with your application ?

      C Offline
      C Offline
      Cuban Akira
      wrote on last edited by
      #3

      @SGaist said in problem with font after deploys:

      y your

      deploy my font__???? i dont know how to do that, can you explain me_?

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

        First thing: where does the font you use come from ?

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

        C 1 Reply Last reply
        0
        • SGaistS SGaist

          First thing: where does the font you use come from ?

          C Offline
          C Offline
          Cuban Akira
          wrote on last edited by Cuban Akira
          #5

          @SGaist

          i rightclicked the labels, - styleSheets, - addfont, from there i select the font, so the font may come from the window's system folder

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

            Are you sure it's a system font ?
            What name 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

            C 1 Reply Last reply
            0
            • SGaistS SGaist

              Are you sure it's a system font ?
              What name is it ?

              C Offline
              C Offline
              Cuban Akira
              wrote on last edited by Cuban Akira
              #7

              @SGaist

              is not a default system font, i download the font , and paste in the font system folder, the name of the font is Usuziv2, i use it in my application, then i deploy it, and when i run my app in another pc tha application load another font, thats my problem

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

                You have to distribute that font alongside your application but you must first check that it's allowed by the font author.

                As for the distribution, you can use Qt's resources system.

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

                C 1 Reply Last reply
                1
                • SGaistS SGaist

                  You have to distribute that font alongside your application but you must first check that it's allowed by the font author.

                  As for the distribution, you can use Qt's resources system.

                  C Offline
                  C Offline
                  Cuban Akira
                  wrote on last edited by
                  #9

                  @SGaist
                  now i added the font to a resource file that i create, but dont know how to set te font from the resource file to the label

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

                    QFontDatabase is the best place to handle fonts.

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

                    C 1 Reply Last reply
                    1
                    • SGaistS SGaist

                      QFontDatabase is the best place to handle fonts.

                      C Offline
                      C Offline
                      Cuban Akira
                      wrote on last edited by
                      #11

                      @SGaist said in problem with font after deploys:

                      e best place to h

                      solved

                      first add the font to the .qrc file, and then this line>
                      QFontDatabase::addApplicationFont(“:/fonts/fontName.ttf”);
                      and the labels with font: xpx, "fontName";

                      thanks

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

                        You're welcome !

                        Since you have it working now, please mark the thread as solved using the "Topic Tools" 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