我想加载大小为150kb的自定义字体,但我得到EXCEEDS_LIMIT错误,并且在控制台下面的代码中打印“EXCEEDS_LIMIT”,我试图减小ttf大小但是我失败了 任何的想法??
LabelField helloWorld = new LabelField("Hello World");
int res = FontManager.getInstance().load("PageD1.TTf", "MyFont",
FontManager.EXCEEDS_LIMIT);
if (res == FontManager.SUCCESS) {
try {
FontFamily family = FontFamily.forName("MyFont");
Font myFont = family.getFont(Font.PLAIN, 50);
helloWorld.setFont(myFont);
} catch (ClassNotFoundException e) {
System.out.println(e.getMessage());
}
} else if (res == FontManager.EXCEEDS_LIMIT) {
System.out.println("EXCEEDS_LIMIT");
}
add(helloWorld);