HISE Logo Forum
    • Categories
    • Register
    • Login

    Text in a Panel

    Scheduled Pinned Locked Moved General Questions
    15 Posts 4 Posters 426 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.
    • d.healeyD
      d.healey @Sawer
      last edited by d.healey

      @nesta99 You need both, you have to load the font before you can set it in the paint routine.

      https://docs.hise.audio/scripting/scripting-api/engine/index.html#loadfontas
      https://docs.hise.audio/scripting/scripting-api/graphics/index.html#setfont

      Search this page for "font"
      https://docs.hise.audio/scripting/scripting-in-hise/scriptpanel.html

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

      S 2 Replies Last reply Reply Quote 0
      • S
        Sawer @d.healey
        last edited by

        @d-healey Thanks. Tried there before coming here to ask, I will check again! Thanks man

        1 Reply Last reply Reply Quote 0
        • S
          Sawer @d.healey
          last edited by

          @d-healey what's the fontID in the "loadFontAs"or how can i call this function correctly?
          So that it can load the font.

          The "loadFont" here on mac is Depreciated.

          1 Reply Last reply Reply Quote 0
          • Dan KorneffD
            Dan Korneff
            last edited by

            loadfontas.png

            so something like

            Engine.loadFontAs("{PROJECT_FOLDER}Fonts/mycoolfont.ttf", "My Cool Font");
            

            Dan Korneff - Producer / Mixer / Audio Nerd

            S 1 Reply Last reply Reply Quote 0
            • S
              Sawer @Dan Korneff
              last edited by

              @dustbro Is {PROJECT_FOLDER} a default text or I should replace it with the file path? I've just copy/paste that and replaces the font name, but it says "file not found".

              Thanks

              LindonL 1 Reply Last reply Reply Quote 0
              • LindonL
                Lindon @Sawer
                last edited by

                @nesta99 put the font you require in the images folder, and then leave {PROJECT_FOLDER} alone

                HISE Development for hire.
                www.channelrobot.com

                1 Reply Last reply Reply Quote 0
                • Dan KorneffD
                  Dan Korneff
                  last edited by

                  {PROJECT_FOLDER} = Image folder

                  Dan Korneff - Producer / Mixer / Audio Nerd

                  S 1 Reply Last reply Reply Quote 0
                  • S
                    Sawer @Dan Korneff
                    last edited by

                    @dustbro @Lindon
                    Thanks for the help.

                    But, I mean, is my computer dumb? ahah :D
                    I don't know why but still tell me that the file is not found. here are two Images, the first one where i have the .ttf file in the images folder and second I have the code. I don't know what's missing now.
                    Screen Shot 2021-02-16 at 15.53.38.png Screen Shot 2021-02-16 at 15.51.17.png

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

                      @nesta99

                      i have the .ttf file in the images folder

                      Is it in the images folder or in a folder called Fonts in the images folder?

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

                      S 1 Reply Last reply Reply Quote 0
                      • S
                        Sawer @d.healey
                        last edited by

                        @d-healey In the images folder.

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

                          @nesta99 Then why are you using {PROJECT_FOLDER}Fonts/... as the path ;)

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

                          S 1 Reply Last reply Reply Quote 1
                          • S
                            Sawer @d.healey
                            last edited by

                            @d-healey
                            It's so true.
                            Thanks David. I'm learning all this by doing ahaha, so things that you may take as granted, It will take hours for me.

                            You're a lifesaver man!
                            Hope to be good at scripting like all of you guys here!!

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

                            22

                            Online

                            1.7k

                            Users

                            11.8k

                            Topics

                            103.1k

                            Posts