我们正试图在资源管理器中加载一个真正的字体字体在libgdx项目中。我们遵循严格的wiki entry。然而,我们得到的异常LIBGDX资产管理器加载真实字体字体
Exception in thread "LWJGL Application" com.badlogic.gdx.utils.GdxRuntimeException: com.badlogic.gdx.utils.GdxRuntimeException: Couldn't load dependencies of asset: basicfont.ttf
用下面的代码
// First, let's define the params and then load our smaller font
FreetypeFontLoader.FreeTypeFontLoaderParameter parameter = new FreetypeFontLoader.FreeTypeFontLoaderParameter();
parameter.fontFileName = "basicfont.ttf";
parameter.fontParameters.size = 10;
game.manager.load("font.ttf", BitmapFont.class, parameter);
game.manager.finishLoading();
我们已经加载的字体没有资产管理公司。 此外,我们还读了this link并按照说明解决问题。
谢谢!奇迹般有效 :) – user107641