Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Font rendering bug on some Android devices!?

Font rendering bug on some Android devices!?

Scheduled Pinned Locked Moved QML and Qt Quick
16 Posts 7 Posters 11.7k Views
  • 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.
  • X Offline
    X Offline
    Xander84
    wrote on 2 Apr 2014, 14:58 last edited by
    #1

    Hi, I have some weird font rendering bug with Qt 5.2.1 on Android, until now only one user reported that bug but I cannot reproduce it on any of my Android devices. It looks like this (he send me a "screenshot":http://i.imgur.com/wqGijgi.png):
    !http://i.imgur.com/wqGijgi.png(font bug)!

    how it should look like (on my devices): http://i.imgur.com/20zOYJP.png
    !http://i.imgur.com/20zOYJP.png(screenshot)!

    As you can see some Text elements are missing letters or the text is cut off in the middle of a letter, on other text elements it works just fine, so not all element have rendering issues, very weird.

    The bug was reported from an Sony Xperia T (LT30p) device, but I have some other users with Sony devices that work just fine, so I have no idea how I can fix that bug.

    Maybe that is some OpenGL bug with the QML renderer? I only use a default Text element with the default font (nothing set as font.family) so I assume it uses the Roboto font on Android.

    Any ideas maybe? :)

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andreyc
      wrote on 2 Apr 2014, 15:17 last edited by
      #2

      What about android versions. Are they the same on the both phones?

      1 Reply Last reply
      0
      • X Offline
        X Offline
        Xander84
        wrote on 2 Apr 2014, 15:41 last edited by
        #3

        Hi, the user didn't provide the android version.. I might ask him, but as far as I can see it should be Android 4.0.3+
        Anyway I don't think that should matter much, since Qt should run on all android version from 2.3+.
        What I can see form the screenshot that he is using a non default Android launcher, but many device manufacturers provide custom Android launchers, I have no way of testing that myself because I don't have access to all the different devices.

        In another thread here I described problems with 3rd party virtual keyboards and Qt input, so there are some problems with non default android widgets I guess?

        1 Reply Last reply
        0
        • X Offline
          X Offline
          Xander84
          wrote on 23 Apr 2014, 13:17 last edited by
          #4

          I still have some users complaining about this bug, I hope this gets fixed with Qt 5.3. :/

          Another screenshot from a user using Samsung Galaxy 3 running CM11:
          !http://i.imgur.com/GIzIYFZ.png(font bug)!

          Same thing reported from a user running Samsung Galaxy 3 on Android version 4.3.

          I don't know if that is only happening only samsung devices, but i know some users have no problems on samsung devices and I still can't reproduce this bug.. :(
          From what I can see mostly bold text is affected, very weird, I have one screenshot in landscape mode where normal text is affected too so it's not only bold text but if you look at there screens here it's happening with bold font.

          Anyone have any idea or can maybe test the app on their device? Here is the Google play link: https://play.google.com/store/apps/details?id=ws.aggregator.critiq

          1 Reply Last reply
          0
          • B Offline
            B Offline
            broulik
            wrote on 7 May 2014, 07:51 last edited by
            #5

            I also just got a bugreport from a user with a Sony Xperia TS running Android 4.3 that fonts are broken. At the moment I'm using a plain Text element with font.family set to Roboto and shipping the Roboto font with the app to workaround a HTC rendering bug.

            There have been a lot of fixes for text rendering on Android recently and I hope that one is among them :/

            I'm getting more and more reports of people with broken font rendering (so far various Huawei (P2, P6) devices, Sony Xperia TS, HTC One S (however I cannot reproduce it on that device)...

            1 Reply Last reply
            0
            • X Offline
              X Offline
              Xander84
              wrote on 7 May 2014, 13:12 last edited by p3c0
              #6

              Hi, yeah I know the worst is we can't reproduce the bug ourselves and test possible fixes for it. :/

              Another user send me a possible workaround, I have set the QML environment variable QML_USE_GLYPHCACHE_WORKAROUND to 1, that should work for some devices, but again I can't test it myself so it's hard to say.

              qputenv("QML_USE_GLYPHCACHE_WORKAROUND", QByteArray("1"));
              

              that workaround was described here: https://bugreports.qt-project.org/browse/QTBUG-34984

              I think most rendering bugs are due to corrupt device drivers for OpenGL, but there is nothing we can do about it I guess.

              1 Reply Last reply
              0
              • B Offline
                B Offline
                broulik
                wrote on 7 May 2014, 13:22 last edited by
                #7

                I just got feedback from a user that Qt 5.3 fixes the issue for him on his Sony Xperia T, I hope it will work on Huawei and the others too. Stay tuned :)

                1 Reply Last reply
                0
                • X Offline
                  X Offline
                  Xander84
                  wrote on 7 May 2014, 13:38 last edited by
                  #8

                  Great, I am waiting fort the stable release of Qt 5.3, but if that fixes the font problems that would be nice. :)

                  1 Reply Last reply
                  0
                  • O Offline
                    O Offline
                    onek24
                    wrote on 8 May 2014, 13:26 last edited by
                    #9

                    Greetings,

                    i have a font rendering bug under windows which doesn't exist on android-devices... strange QML. :)

                    1 Reply Last reply
                    0
                    • J Offline
                      J Offline
                      jiangcaiyang
                      wrote on 9 May 2014, 09:52 last edited by
                      #10

                      I usually use native font "Droid Sans" when building Android application. It is so far so good.

                      1 Reply Last reply
                      0
                      • X Offline
                        X Offline
                        Xander84
                        wrote on 9 May 2014, 14:34 last edited by
                        #11

                        For my app I did not specify any font explicitly, so it should use the default device font I think ( Roboto on Android?). It looked good on my devices so I thought it would be best not to set any font family at all.
                        [quote author="jiangcaiyang" date="1399629141"]I usually use native font "Droid Sans" when building Android application. It is so far so good.[/quote]

                        1 Reply Last reply
                        0
                        • M Offline
                          M Offline
                          mehrdad
                          wrote on 15 Apr 2015, 07:46 last edited by
                          #12

                          Hi
                          how can i set the QML environment variable QML_USE_GLYPHCACHE_WORKAROUND to 1?

                          p3c0P 1 Reply Last reply 15 Apr 2015, 07:53
                          0
                          • M mehrdad
                            15 Apr 2015, 07:46

                            Hi
                            how can i set the QML environment variable QML_USE_GLYPHCACHE_WORKAROUND to 1?

                            p3c0P Offline
                            p3c0P Offline
                            p3c0
                            Moderators
                            wrote on 15 Apr 2015, 07:53 last edited by
                            #13

                            @mehrdad Using qputenv. Call this before loading the QML.

                            157

                            1 Reply Last reply
                            0
                            • M Offline
                              M Offline
                              mehrdad
                              wrote on 15 Apr 2015, 08:08 last edited by
                              #14

                              thanks, it work for huawei p6 but not for textfiled element...

                              p3c0P 1 Reply Last reply 15 Apr 2015, 08:26
                              0
                              • M mehrdad
                                15 Apr 2015, 08:08

                                thanks, it work for huawei p6 but not for textfiled element...

                                p3c0P Offline
                                p3c0P Offline
                                p3c0
                                Moderators
                                wrote on 15 Apr 2015, 08:26 last edited by
                                #15

                                @mehrdad Well the bug report https://bugreports.qt-project.org/browse/QTBUG-34984 (posted by @Xander84 here) says it is fixed. Which Qt version are you using ?

                                157

                                1 Reply Last reply
                                0
                                • M Offline
                                  M Offline
                                  mehrdad
                                  wrote on 16 Apr 2015, 12:27 last edited by
                                  #16

                                  5.4.1
                                  i use textEdit for create my own textField and it work!
                                  thanks...

                                  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