try
{
f = new UnicodeFont("res/thin_pixel-7.ttf", size, false, false);
f.getEffects().add(new ColorEffect());
if (rule == 2) f.getEffects().add(new OutlineEffect(size/50, java.awt.Color.black));
else if (rule == 1) f.getEffects().add(new ShadowEffect(java.awt.Color.gray, size/90, size/90, 0.52f));
f.addAsciiGlyphs();
f.setPaddingTop(f.getAscent()/2);
f.loadGlyphs();
} catch (SlickException e) {}
font_index.put(size+rule+"", f);