Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Chinese Fonts on the Raspberry Pi 3
Qt 6.11 is out! See what's new in the release blog

Chinese Fonts on the Raspberry Pi 3

Scheduled Pinned Locked Moved Solved General and Desktop
18 Posts 4 Posters 9.8k 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.
  • B Offline
    B Offline
    bask185
    wrote on last edited by
    #9

    @jsulm said in Chinese Fonts on the Raspberry Pi 3:

    @bask185 Do you have this problem when running your app in PIXEL?

    Yes, and because of some slowness bug I have to boot to Pixel. When I boot to the CLI the app runs significantly slower for some reason.

    jsulmJ 1 Reply Last reply
    0
    • B bask185

      @jsulm said in Chinese Fonts on the Raspberry Pi 3:

      @bask185 Do you have this problem when running your app in PIXEL?

      Yes, and because of some slowness bug I have to boot to Pixel. When I boot to the CLI the app runs significantly slower for some reason.

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #10

      @bask185 I guess if you boot to CLI you get framebuffer device without any hardware acceleration. In this case it is not a bug.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      B 1 Reply Last reply
      0
      • jsulmJ jsulm

        @bask185 I guess if you boot to CLI you get framebuffer device without any hardware acceleration. In this case it is not a bug.

        B Offline
        B Offline
        bask185
        wrote on last edited by
        #11

        @jsulm That the cause of something might have a perfectly clear reason, does not mean that something isn't a bug persé. That slow running bug was one helluva annoying bug to me, whatever the reason may be.

        But how does this help me teach the Raspberry speak Chinese?

        jsulmJ 1 Reply Last reply
        0
        • B bask185

          @jsulm That the cause of something might have a perfectly clear reason, does not mean that something isn't a bug persé. That slow running bug was one helluva annoying bug to me, whatever the reason may be.

          But how does this help me teach the Raspberry speak Chinese?

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #12

          @bask185 said in Chinese Fonts on the Raspberry Pi 3:

          But how does this help me teach the Raspberry speak Chinese?

          It does not, I just wanted to say that framebuffer devices do not have hardware acceleration and this can be the reason for slow UI.

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • B Offline
            B Offline
            bask185
            wrote on last edited by
            #13

            Well I narrowed down the folder out of which the application picks it's fonts. If I leave 1 font, she will pick that one. So I could modify the font in the application.

            /usr/local/qt5pi/lib/fonts
            

            I vaguely remembered I once had no texts at all, so I dug up some e-mails and I remembered I had to manually copy paste fonts into the folder. What I however don't know is how the app picks one of them. I know it does not pick the first on the list.

            www.qtrpi.com's FAQ had a step with which I had to add an export line to .basrc. I think that that line was supposed to copy ttf files to that folder. But that did not work for me.

            I already downloaded a chinese font, but now everything were squares.

            I now only have to find and copy a complete .ttf file in that folder, that ought to teach this Raspberry some Chinese...

            1 Reply Last reply
            0
            • B Offline
              B Offline
              bask185
              wrote on last edited by
              #14

              Well I finally have me some Chinese characters, it was indeed copying a suitable .ttf to the fonts folder. I still dont have Thai though :D

              I just found a website with which you can open .ttf files so you can look for your unicodes/characters. I only wish I would have thought of this earlier.. like before I solved the file. I still don't know if Qt can work with 2 or more different font files.... all the plain text is kinda ugly now :D
              CharMap

              mrjjM 1 Reply Last reply
              0
              • B bask185

                Well I finally have me some Chinese characters, it was indeed copying a suitable .ttf to the fonts folder. I still dont have Thai though :D

                I just found a website with which you can open .ttf files so you can look for your unicodes/characters. I only wish I would have thought of this earlier.. like before I solved the file. I still don't know if Qt can work with 2 or more different font files.... all the plain text is kinda ugly now :D
                CharMap

                mrjjM Offline
                mrjjM Offline
                mrjj
                Lifetime Qt Champion
                wrote on last edited by mrjj
                #15

                @bask185
                Hi
                Qt can use any font installed on the system.
                You can even use custom fonts not installed with
                QFontDatabase::addApplicationFont("qrc:///resources/Triforce.ttf");
                https://forum.qt.io/topic/57772/using-custom-fonts

                1 Reply Last reply
                0
                • B Offline
                  B Offline
                  bask185
                  wrote on last edited by
                  #16

                  Yeah I came across the QFontDatabase in my 'Quest' for the solution. But not long after, I knew which folder my app was using for fonts. At that point I only had to find a decent Chinese and Thai font.

                  For me it does not really matter whether the app picks a font out of the resource folder or the "/usr/local/qt5pi/lib/" fonts folder. Well that is not true, it does matter because now I do not have to learn how QFontDatabase works and produce (redundant) lines of code :P + if I want to add a new .ttf, I merely have to download and move the file to the folder. If I would use the resource folder instead I would also have to add a line of code in the app to include that font.

                  My project is almost done now. So I will update my report and clone the Pi's SD card. My superior was impressed ;)

                  mrjjM E 2 Replies Last reply
                  3
                  • B bask185

                    Yeah I came across the QFontDatabase in my 'Quest' for the solution. But not long after, I knew which folder my app was using for fonts. At that point I only had to find a decent Chinese and Thai font.

                    For me it does not really matter whether the app picks a font out of the resource folder or the "/usr/local/qt5pi/lib/" fonts folder. Well that is not true, it does matter because now I do not have to learn how QFontDatabase works and produce (redundant) lines of code :P + if I want to add a new .ttf, I merely have to download and move the file to the folder. If I would use the resource folder instead I would also have to add a line of code in the app to include that font.

                    My project is almost done now. So I will update my report and clone the Pi's SD card. My superior was impressed ;)

                    mrjjM Offline
                    mrjjM Offline
                    mrjj
                    Lifetime Qt Champion
                    wrote on last edited by
                    #17

                    @bask185

                    -. My superior was impressed ;)

                    Super :)

                    1 Reply Last reply
                    2
                    • B bask185

                      Yeah I came across the QFontDatabase in my 'Quest' for the solution. But not long after, I knew which folder my app was using for fonts. At that point I only had to find a decent Chinese and Thai font.

                      For me it does not really matter whether the app picks a font out of the resource folder or the "/usr/local/qt5pi/lib/" fonts folder. Well that is not true, it does matter because now I do not have to learn how QFontDatabase works and produce (redundant) lines of code :P + if I want to add a new .ttf, I merely have to download and move the file to the folder. If I would use the resource folder instead I would also have to add a line of code in the app to include that font.

                      My project is almost done now. So I will update my report and clone the Pi's SD card. My superior was impressed ;)

                      E Offline
                      E Offline
                      Eeli K
                      wrote on last edited by
                      #18

                      @bask185 You may like Google Noto fonts https://www.google.com/get/noto/.

                      1 Reply Last reply
                      3

                      • Login

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