This commit is contained in:
Anuken
2020-11-06 19:45:56 -05:00
parent 325800caab
commit 8c3577c55a
2 changed files with 5 additions and 2 deletions

View File

@@ -211,7 +211,10 @@ public class Fonts{
public static TextureRegionDrawable getGlyph(Font font, char glyph){
Glyph g = font.getData().getGlyph(glyph);
if(g == null) throw new IllegalArgumentException("No glyph: " + glyph + " (" + (int)glyph + ")");
if(g == null){
Log.err("No glyph: " + glyph + " (" + (int)glyph + ")");
return new TextureRegionDrawable(Core.atlas.find("whiteui"));
}
float size = Math.max(g.width, g.height);
TextureRegionDrawable draw = new TextureRegionDrawable(new TextureRegion(font.getRegion().texture, g.u, g.v2, g.u2, g.v)){