HISE Logo Forum
    • Categories
    • Register
    • Login

    Icon Fonts - Syntax error in unicode escape sequence

    Scheduled Pinned Locked Moved Scripting
    14 Posts 4 Posters 264 Views
    Loading More Posts
    • 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.
    • Dan KorneffD
      Dan Korneff
      last edited by

      From the web:

      \u is used in JavaScript and similar languages for Unicode escape sequences, but it must be followed immediately by a valid four-digit hexadecimal code (e.g., \u1234).

      Dan Korneff - Producer / Mixer / Audio Nerd

      d.healeyD 1 Reply Last reply Reply Quote 0
      • d.healeyD
        d.healey @Dan Korneff
        last edited by

        @Dan-Korneff That's what I'm doing, but when I create such a string through concatenation JUCE gets unhappy.

        Libre Wave - Freedom respecting instruments and effects
        My Patreon - HISE tutorials
        YouTube Channel - Public HISE tutorials

        Dan KorneffD 1 Reply Last reply Reply Quote 0
        • Dan KorneffD
          Dan Korneff @d.healey
          last edited by

          @d-healey
          If generating dynamically, use String.fromCharCode with parseInt.

          Is there an equivalent in HISE?

          Dan Korneff - Producer / Mixer / Audio Nerd

          d.healeyD 1 Reply Last reply Reply Quote 0
          • d.healeyD
            d.healey @Dan Korneff
            last edited by

            @Dan-Korneff Oh interesting, I'll give it a try

            Libre Wave - Freedom respecting instruments and effects
            My Patreon - HISE tutorials
            YouTube Channel - Public HISE tutorials

            1 Reply Last reply Reply Quote 0
            • d.healeyD
              d.healey
              last edited by

              I tried using parseInt and String.getIntValue, but no joy. We don't have a .fromCharCode function as far as I can tell.

              Libre Wave - Freedom respecting instruments and effects
              My Patreon - HISE tutorials
              YouTube Channel - Public HISE tutorials

              1 Reply Last reply Reply Quote 0
              • clevername27C
                clevername27 @d.healey
                last edited by clevername27

                @d-healey JUCE 6 doesn't fully support Unicode. There's a great free, ASC icon font, Modern Pictograms, that works well with HISE.

                d.healeyD 1 Reply Last reply Reply Quote 0
                • d.healeyD
                  d.healey @clevername27
                  last edited by

                  @clevername27 said in Icon Fonts - Syntax error in unicode escape sequence:

                  JUCE 6 doesn't fully support Unicode.

                  I don't think JUCE 8 does either, at least not with fonts. But this particular situation is supported.

                  The Modern Pictograms look nice but seems their license makes it unusable for my projects.

                  Libre Wave - Freedom respecting instruments and effects
                  My Patreon - HISE tutorials
                  YouTube Channel - Public HISE tutorials

                  clevername27C 1 Reply Last reply Reply Quote 0
                  • clevername27C
                    clevername27 @d.healey
                    last edited by

                    @d-healey I own a commercial license for the font that I'm not using - you're welcome to it.

                    d.healeyD 1 Reply Last reply Reply Quote 0
                    • d.healeyD
                      d.healey @clevername27
                      last edited by

                      @clevername27 Thanks, won't help me though, I need to be able to distribute it with my source code and they don't have a license for that.

                      Libre Wave - Freedom respecting instruments and effects
                      My Patreon - HISE tutorials
                      YouTube Channel - Public HISE tutorials

                      clevername27C ustkU 2 Replies Last reply Reply Quote 1
                      • clevername27C
                        clevername27 @d.healey
                        last edited by

                        @d-healey Doh.

                        1 Reply Last reply Reply Quote 0
                        • ustkU
                          ustk @d.healey
                          last edited by ustk

                          @d-healey this works if you need concatenation

                          Console.print("\\" + "u" + "e5c3");
                          

                          EDIT: I have not tested if the font draws correctly that being said

                          Can't help pressing F5 in the forum...

                          d.healeyD 1 Reply Last reply Reply Quote 0
                          • d.healeyD
                            d.healey @ustk
                            last edited by

                            @ustk said in Icon Fonts - Syntax error in unicode escape sequence:

                            EDIT: I have not tested if the font draws correctly that being said

                            It gives the same result as "\\" + "ue5c3" which I mentioned in the first post.

                            Libre Wave - Freedom respecting instruments and effects
                            My Patreon - HISE tutorials
                            YouTube Channel - Public HISE tutorials

                            ustkU 1 Reply Last reply Reply Quote 0
                            • ustkU
                              ustk @d.healey
                              last edited by

                              @d-healey Yeah just tested and I didn't help going further...

                              Can't help pressing F5 in the forum...

                              1 Reply Last reply Reply Quote 0
                              • First post
                                Last post

                              14

                              Online

                              1.7k

                              Users

                              11.8k

                              Topics

                              102.3k

                              Posts