I'm trying to preload a load of TTF and OFT fonts on my splash screen that also implements a loading bar aling with textures.
The idea is is that I preload a load of fonts with set sizes then the font manager retrieves the font when it's ready to be used.
I found the following class https://github.com/libgdx/libgdx/blob/master/extensions/gdx-freetype/src/com/badlogic/gdx/graphics/g2d/freetype/FreetypeFontLoader.java
But there is no documentation anywhere of how to use it.
I try the following code:
parameter.size = (int)Math.ceil(fontStorage.fontSize);
FreetypeFontLoader.FreeTypeFontLoaderParameter freeTypeParams = new FreetypeFontLoader.FreeTypeFontLoaderParameter();
freeTypeParams.fontParameters = parameter;
freeTypeParams.fontFileName = fontStorage.fontFile;
GameAssetLoader.getInstance().getAssetManager().load(
fontStorage.fontFile,
FreetypeFontLoader.class,
(AssetLoaderParameters)freeTypeParams
);
I get the following error:
Exception in thread "LWJGL Application" com.badlogic.gdx.utils.GdxRuntimeException: No loader for type: FreetypeFontLoader