raeleus / skin-composer

Create skins for LibGDX scene2d.ui with a graphical interface.
MIT License
427 stars 34 forks source link

Can't import font #144

Closed micabytes closed 10 months ago

micabytes commented 10 months ago

Trying to add Gentium-standard from textratypist (https://github.com/tommyettinger/textratypist/tree/main/knownFonts).

When I try to add fnt, it complains that one shouldn't add fonts that exceed the max export size (2048x2048), but the bitmao for Gentium-standard is exactly 2048x2048.

If I try to create a font from the bitmap, it throws a:

java.lang.IndexOutOfBoundsException: index can't be >= size: 5 >= 5
    at com.badlogic.gdx.utils.IntArray.get(IntArray.java:131)
    at com.ray3k.skincomposer.dialog.DialogImageFont.loadPixmap(DialogImageFont.java:1054)
    at com.ray3k.skincomposer.dialog.DialogImageFont.processSourceFile(DialogImageFont.java:721)
    at com.ray3k.skincomposer.dialog.DialogImageFont.lambda$sourceFileBrowse$4(DialogImageFont.java:711)
    at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.loop(Lwjgl3Application.java:208)
    at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.<init>(Lwjgl3Application.java:166)
    at com.ray3k.skincomposer.desktop.DesktopLauncher.main(DesktopLauncher.java:487)

Any thoughts?

micabytes commented 10 months ago

Ah, nevermind. I see the error message says "less than" the max size. It is not less than when it is exactly that size, of course, so presumably that is the issue here.