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. How to show on Android "Erase back-left" character in QML
Forum Updated to NodeBB v4.3 + New Features

How to show on Android "Erase back-left" character in QML

Scheduled Pinned Locked Moved Solved Mobile and Embedded
7 Posts 2 Posters 742 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.
  • DavronitoD Offline
    DavronitoD Offline
    Davronito
    wrote on last edited by Davronito
    #1

    Hello friends!
    I wanted to show a Unicode character of "erase back-left" (U+232B, ⌫) in my QML application for Android. Used it in Text component. On my Android 6.0 it shows, but on other versions doesn't show. How can I use it?

    J.HilkJ 1 Reply Last reply
    0
    • DavronitoD Offline
      DavronitoD Offline
      Davronito
      wrote on last edited by
      #2
      This post is deleted!
      1 Reply Last reply
      0
      • DavronitoD Davronito

        Hello friends!
        I wanted to show a Unicode character of "erase back-left" (U+232B, ⌫) in my QML application for Android. Used it in Text component. On my Android 6.0 it shows, but on other versions doesn't show. How can I use it?

        J.HilkJ Offline
        J.HilkJ Offline
        J.Hilk
        Moderators
        wrote on last edited by
        #3

        Hi @Davronito

        it is most likely missing from the (default?) font in your application.

        If you ship your own font that includes that character, it should show in all versions


        Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


        Q: What's that?
        A: It's blue light.
        Q: What does it do?
        A: It turns blue.

        DavronitoD 1 Reply Last reply
        0
        • J.HilkJ J.Hilk

          Hi @Davronito

          it is most likely missing from the (default?) font in your application.

          If you ship your own font that includes that character, it should show in all versions

          DavronitoD Offline
          DavronitoD Offline
          Davronito
          wrote on last edited by
          #4

          @J-Hilk Ok, but how to "ship" my own font? and I don't know which font family supports that character. I found something at stackoverflow, does it help? https://stackoverflow.com/questions/26845239/how-to-change-font-family-in-qml-app

          J.HilkJ 1 Reply Last reply
          0
          • DavronitoD Davronito

            @J-Hilk Ok, but how to "ship" my own font? and I don't know which font family supports that character. I found something at stackoverflow, does it help? https://stackoverflow.com/questions/26845239/how-to-change-font-family-in-qml-app

            J.HilkJ Offline
            J.HilkJ Offline
            J.Hilk
            Moderators
            wrote on last edited by
            #5

            @Davronito
            there are a couple of ways to do it.
            For example QML has the font loader class:
            https://doc.qt.io/qt-5/qml-qtquick-fontloader.html

            Or you could pack the ttf/otf (etc) into your resource file and simply load it during start up via
            https://doc.qt.io/qt-5/qfontdatabase.html#addApplicationFont


            Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


            Q: What's that?
            A: It's blue light.
            Q: What does it do?
            A: It turns blue.

            DavronitoD 1 Reply Last reply
            4
            • J.HilkJ J.Hilk

              @Davronito
              there are a couple of ways to do it.
              For example QML has the font loader class:
              https://doc.qt.io/qt-5/qml-qtquick-fontloader.html

              Or you could pack the ttf/otf (etc) into your resource file and simply load it during start up via
              https://doc.qt.io/qt-5/qfontdatabase.html#addApplicationFont

              DavronitoD Offline
              DavronitoD Offline
              Davronito
              wrote on last edited by
              #6

              @J-Hilk Oh thanks you, bro! I think I've found the solution!

              Column {
              FontLoader { id: fixedFont; name: "Courier" }
              FontLoader { id: webFont; source: "http://www.mysite.com/myfont.ttf" }

              Text { text: "Fixed-size font"; font.family: fixedFont.name }
              Text { text: "Fancy font"; font.family: webFont.name }
              

              }

              Best regards!)

              J.HilkJ 1 Reply Last reply
              1
              • DavronitoD Davronito

                @J-Hilk Oh thanks you, bro! I think I've found the solution!

                Column {
                FontLoader { id: fixedFont; name: "Courier" }
                FontLoader { id: webFont; source: "http://www.mysite.com/myfont.ttf" }

                Text { text: "Fixed-size font"; font.family: fixedFont.name }
                Text { text: "Fancy font"; font.family: webFont.name }
                

                }

                Best regards!)

                J.HilkJ Offline
                J.HilkJ Offline
                J.Hilk
                Moderators
                wrote on last edited by
                #7

                @Davronito
                you're welcome!

                Don't forget to use the topic tools to set the topic to solved 😉


                Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


                Q: What's that?
                A: It's blue light.
                Q: What does it do?
                A: It turns blue.

                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