Fonts Not Loading in Compiled Plugin
-
Does anyone know why some fonts, only specified in the Inspector won't load in the compiled plugin?
Specifically, any instance of fonts where the font is specified in the Inspector (like for a label).
EDIT: Working! I tried so many things that I'm not sure what specifically did it. But if anyone else has this issue, DM me, and I'll give you a list of things to try.
-
@clevername27 Access issue?
I use the inspector merely to preview fonts. I then load the fonts into the plugin and make sure to use these.
Shipping cross-platform... it's best to make sure all the assets are with you rather than relying on system font availability.
-
@aaronventure Thank you for your response, and the info about shipping cross-platform.Strangely enough, none of the fonts I reference manually in scripts are working either (on a computer that doesn't have them.)
-
@clevername27 @Christoph-Hart , is there an equivalent to checking PresetData.h that would reveal if the fonts are being embedded?
-
@clevername27 Thank you - I'll go though my code and see if any of the fonts not appearing are only referenced in the Inspector.
-
@clevername27 are you using Engine.loadFontAs() and then reference them with the string you pass in there as name? This is the most robust way as the font names might slightly differ between OS otherwise.
If you loaded them once before export they should be embedded in the binary.
-
@Christoph-Hart Cheers. I am indeed, but wondering if I ever reference them explicitly in an LAF or otherwise. Currently testing.
-
@aaronventure How do I set fonts without using an LAF? (Like for a label.) I set the global font, but that doesn't seem to. be embedded, as well.
-
@Christoph-Hart @aaronventure Thanks guys, it's working now.
-