Issue with Font Not Displaying in Exported HISE Project
-
Hi there,
I’m encountering an issue with a custom font in my HISE project. The font file (e.g., Starlight Alaska.ttf) is placed in the project folder and loaded using the following code:Engine.loadFontAs("{PROJECT_FOLDER}Starlight.ttf", "Starlight");
In my project, I input text into a text box, and that text is then displayed in a label using the loaded font. This works perfectly within HISE during development. However, once I export the project (as a standalone or plugin), the font is not applied to the label, and it defaults to a generic font.
Has anyone encountered a similar issue or can provide advice on how to ensure the custom font works correctly in the exported version of the project?
Thank you for your help!
-
@treynterrio You need to create a folder named
Fonts
under the Images folder and copy it into it. I think you copied it directly to the Images folder.So the folder path will be like:
{PROJECT_FOLDER}Fonts/Starlight.ttf
Also, the "Embed Image Files" option must be selected in the Settings section.
-
@orange said in Issue with Font Not Displaying in Exported HISE Project:
{PROJECT_FOLDER}Fonts
yup that was the problem. thanks
-
@orange now I have another problem the font is loaded but as soon as I reopen the plugin the font is gone and I can't type it in again
-
@treynterrio you'll need a copy in the FHISE images folder dont move a font there, or your OS wont be able to find it.
-
@Lindon I already have a copy there. I can use it in the exported plugin but its gone when I reopen it
-
@treynterrio gone how gone?
-
@Lindon I write something in a label, this is displayed in another label. When I reopen the plugin it no longer appears.
-
@treynterrio said in Issue with Font Not Displaying in Exported HISE Project:
@Lindon I write something in a label, this is displayed in another label. When I reopen the plugin it no longer appears.
I really have no idea what this means.. sorry.
-
@Lindon It should stay in the Label
-
@treynterrio Is your label set to saveInPreset?
-
@d-healey yes i try to save it now in a .js file to reopen it after restart
-
@treynterrio I mean is the saveInPreset property for the label set to Enabled
-
@d-healey yes it is
-
@treynterrio it’s not clear to figure it out.
Snippet please
-
HiseSnippet 1047.3ocsV01aiTCD1aRW3ZfCwg3GfU9TJTERHaxU3Dh1lWf.8knlxI9VkytdSrpi8p0d60nSmD+j4e.L16lr61KkdJhKenpdl4YlmY7Li2IwRepRIiQN0tdUDE474tSWIzK5ufvDnwCPNeg64DklFiSEc5pHhRQCPNNU+Ei.m82CY+82+7oDNQ3SyE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64VlylJvTpHvd3efeYJaaN6jor8ZknkD+X4M9oyflmselUBvIgsEbe3asfy31qm9xqyKguh3Fe+xt58.986JvN6JPucEX2cEXucE3K2UfG8z.Mej2IIZ4xzwFD57ICsKMcbFJLaJrcqn+EP4IETV
-
@treynterrio it doesn't even work when I save it in a .json file and load it onOpen
-
You need to use "Starlight" as the ID.
Engine.loadFontAs("{PROJECT_FOLDER}Fonts/Starlight.ttf", "Starlight");
-
@d-healey its still the same issue as soon as I reopen the plugin it its gone
-
@treynterrio
If you do it with Look and Feel it should work.