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. How to access glyph after U+FFFF

How to access glyph after U+FFFF

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
6 Posts 2 Posters 1.6k 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.
  • F Offline
    F Offline
    FabriceS
    wrote on last edited by
    #1

    I cannot not figure out how to access a TTF glyph after U+FFFF in QML/Javascript string, \u1abcd gives strange results (multi-glyphs).

    Is something like \U10000 implemented in QML/Javascript ?

    Is there documentation about this (other than http://doc.qt.io/qt-5/unicode.html) ?

    E 2 Replies Last reply
    0
    • F FabriceS

      I cannot not figure out how to access a TTF glyph after U+FFFF in QML/Javascript string, \u1abcd gives strange results (multi-glyphs).

      Is something like \U10000 implemented in QML/Javascript ?

      Is there documentation about this (other than http://doc.qt.io/qt-5/unicode.html) ?

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

      @FabriceS Does this help: https://mathiasbynens.be/notes/javascript-escapes ?

      1 Reply Last reply
      0
      • F FabriceS

        I cannot not figure out how to access a TTF glyph after U+FFFF in QML/Javascript string, \u1abcd gives strange results (multi-glyphs).

        Is something like \U10000 implemented in QML/Javascript ?

        Is there documentation about this (other than http://doc.qt.io/qt-5/unicode.html) ?

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

        @FabriceS You can also try setting the encoding of the source file to UTF-8 and copy or insert unicode characters directly. But what you mean by "TTF glyph"? You don't insert glyphs to strings.

        1 Reply Last reply
        0
        • F Offline
          F Offline
          FabriceS
          wrote on last edited by
          #4

          I will test. I am using a TTF font to display icons (like FontAwesome) but glyphs were placed after U+FFFF.

          1 Reply Last reply
          0
          • E Offline
            E Offline
            Eeli K
            wrote on last edited by
            #5

            You could also try writing a c++ helper class and use it from qml. In c++ you can use longer escape sequences (see e.g. http://stackoverflow.com/questions/2735101/number-of-digits-in-a-hex-escape-code-in-c-c and http://en.cppreference.com/w/cpp/language/escape).

            1 Reply Last reply
            0
            • E Offline
              E Offline
              Eeli K
              wrote on last edited by
              #6

              The last resort is to create your own version of the font with FontForge (if the licence allows that). Copying from one codepoint to another is easy. I don't understand why the maker of the font has used such high codepoints while a private use area was available under FFFF for 6400 code points.

              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