This commit is contained in:
Anuken
2020-09-16 14:53:44 -04:00
parent 0847fc9f09
commit 5c98512e4f
10 changed files with 39 additions and 57 deletions

View File

@@ -115,7 +115,9 @@ public class Fonts{
/** Called from a static context for use in the loading screen.*/
public static void loadDefaultFont(){
UI.packer = new PixmapPacker(2048, 2048, Format.rgba8888, 2, true);
int max = Gl.getInt(Gl.maxTextureSize);
UI.packer = new PixmapPacker(max >= 4096 ? 4096 : 2048, 2048, Format.rgba8888, 2, true);
FileHandleResolver resolver = new InternalFileHandleResolver();
Core.assets.setLoader(FreeTypeFontGenerator.class, new FreeTypeFontGeneratorLoader(resolver));
Core.assets.setLoader(Font.class, null, new FreetypeFontLoader(resolver){