【发布时间】:2017-10-08 02:28:19
【问题描述】:
我们正在尝试在 libgdx 项目中使用资产管理器加载 true type 字体。我们严格遵循wiki entry 。但是,我们得到了异常
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,按照说明进行操作,并没有解决问题。
【问题讨论】: