HISE Logo Forum
    • Categories
    • Register
    • Login

    LoadFonts...again

    Scheduled Pinned Locked Moved General Questions
    18 Posts 5 Posters 1.3k 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 @Lindon
      last edited by

      @Lindon You're missing an underscore: {PROJECT_FOLDER}

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

      LindonL 1 Reply Last reply Reply Quote 1
      • LindonL
        Lindon @d.healey
        last edited by

        @d-healey Oh what a doofus --- again. Thanks Dave.

        HISE Development for hire.
        www.channelrobot.com

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

          This is sooooo frustrating - now its lost the font again heres my code:

          Engine.loadFontAs("{PROJECT_FOLDER}NETTOOFFC.TTF", "Netto");

          (yeah I remembered the underscore this time...)

          and this file is in the Fonts fiodler in this instrument.

          HISE Development for hire.
          www.channelrobot.com

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

            @Lindon You don't have the Fonts folder in your path ;)

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

            LindonL 1 Reply Last reply Reply Quote 0
            • LindonL
              Lindon @d.healey
              last edited by Lindon

              @d-healey .....aaaaaaand now its found them again.....

              so its working with no change to the code... what's going on?

              HISE Development for hire.
              www.channelrobot.com

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

                @Lindon No idea :p

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

                LindonL 1 Reply Last reply Reply Quote 0
                • LindonL
                  Lindon @d.healey
                  last edited by Lindon

                  @d-healey makes two of us.... doesnt inspire confidence...I must be doing something wrong.

                  HISE Development for hire.
                  www.channelrobot.com

                  1 Reply Last reply Reply Quote 0
                  • Christoph HartC
                    Christoph Hart
                    last edited by

                    Yeah, font loading is horrible - different OS use other names, sometimes only distinguished by a lowercase / uppercase difference and there is nothing I can do about that except for providing the Engine.getOS() function call :)

                    Also, if the font is installed on your system, it looks OK, and there's no easy way of testing it on a bare system, except for, well using a clean system without the font installed.

                    What you're experiencing sounds to me like you had the font installed, then somehow removed it from your system fonts and now you're relying on the "embedded font", which is using a wrong name / ID.

                    Another thing that I'd recommend in order to make sure to use the correct file reference is using the double click feature in the HISE File browser:

                    1. Click on a code editor (so that it has the green outline).
                    2. Open the file browser. I have copied the fonts into a Font subdirectory of the images and I am not sure if this is necessary or if they can also be in the image root folder.
                    3. Double click on the font file and it should paste a valid project folder reference into the code editor. This works with almost any file type and makes sure that you don't type anything wrong.
                    orangeO gorangroovesG 2 Replies Last reply Reply Quote 1
                    • orangeO
                      orange @Christoph Hart
                      last edited by

                      @Christoph-Hart Where have you been man, we missed you. I hope everything is right ;)

                      develop Branch / XCode 13.1
                      macOS Monterey / M1 Max

                      1 Reply Last reply Reply Quote 0
                      • gorangroovesG
                        gorangrooves @Christoph Hart
                        last edited by

                        @Christoph-Hart So, if a font is not installed on a machine, but it present in the project folder and called upon within the project, is it supposed to display properly?
                        I built my project on PC where the font is installed. I now opened it on Mac (without the font installed) and it is not displaying, despite the font being present within the project folder.
                        Do I need to have it installed on the machine compiling the instrument plugin?

                        Goran Rista
                        https://gorangrooves.com

                        Handy Drums and Handy Grooves
                        https://library.gorangrooves.com

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

                          @gorangrooves said in LoadFonts...again:

                          @Christoph-Hart So, if a font is not installed on a machine, but it present in the project folder and called upon within the project, is it supposed to display properly?
                          I built my project on PC where the font is installed. I now opened it on Mac (without the font installed) and it is not displaying, despite the font being present within the project folder.
                          Do I need to have it installed on the machine compiling the instrument plugin?

                          Did you load it in your script using Engine.loadFontAs();

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

                          gorangroovesG 1 Reply Last reply Reply Quote 0
                          • gorangroovesG
                            gorangrooves @d.healey
                            last edited by

                            @d-healey Yes. This is what I have.

                            Engine.loadFontAs("{PROJECT_FOLDER}Raleway-Regular.ttf", Releway-Regular);
                            Engine.loadFontAs("{PROJECT_FOLDER}Raleway-Light.ttf", Releway-Light);
                            Engine.loadFontAs("{PROJECT_FOLDER}Raleway-Bold.ttf", Releway-Bold);
                            Engine.setGlobalFont(Releway-Regular);
                            

                            The fonts are placed inside Images directory, but if I specify it, I get an error.

                            Engine.loadFontAs("{PROJECT_FOLDER}Images/Raleway-Regular.ttf", Releway-Regular);
                            

                            or

                            Engine.loadFontAs("{PROJECT_FOLDER}/Images/Raleway-Regular.ttf", Releway-Regular);
                            

                            Produceses and error.

                            Goran Rista
                            https://gorangrooves.com

                            Handy Drums and Handy Grooves
                            https://library.gorangrooves.com

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

                              @gorangrooves Yes that's correct. When you use {PROJECT_FOLDER} with that function HISE automatically looks in the Images folder.

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

                              1 Reply Last reply Reply Quote 0
                              • Christoph HartC
                                Christoph Hart
                                last edited by

                                Put quotes around the font name.

                                gorangroovesG 1 Reply Last reply Reply Quote 1
                                • gorangroovesG
                                  gorangrooves @Christoph Hart
                                  last edited by

                                  @Christoph-Hart Still not working. I edited it into the following:

                                  Engine.loadFontAs("{PROJECT_FOLDER}Raleway-Regular.ttf", "Raleway-Regular");
                                  Engine.loadFontAs("{PROJECT_FOLDER}Raleway-Light.ttf", "Raleway-Light");
                                  Engine.loadFontAs("{PROJECT_FOLDER}Raleway-Bold.ttf", "Raleway-Bold");
                                  Engine.setGlobalFont("Raleway-Regular");
                                  

                                  Everthing compiled ok, but the font is not displaying.

                                  Goran Rista
                                  https://gorangrooves.com

                                  Handy Drums and Handy Grooves
                                  https://library.gorangrooves.com

                                  1 Reply Last reply Reply Quote 0
                                  • gorangroovesG
                                    gorangrooves
                                    last edited by

                                    I think I need to specify "default" as the font for each text item in order for them to display the font.

                                    Goran Rista
                                    https://gorangrooves.com

                                    Handy Drums and Handy Grooves
                                    https://library.gorangrooves.com

                                    1 Reply Last reply Reply Quote 0
                                    • Christoph HartC
                                      Christoph Hart
                                      last edited by

                                      Ah yes, that might be true, it's been a while since I've implemented it, so I don't remember the exact details :)

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

                                      55

                                      Online

                                      1.7k

                                      Users

                                      11.7k

                                      Topics

                                      101.9k

                                      Posts