I’m trying to implement unicode fonts with anti-aliasing. I have a lighting engine with shaders that relies on this blend function:
glBlendFunc(GL_SRC_ALPHA, GL_ONE);
I’ve even tried putting anti-aliasing through the displays pixel format:
Display.create(aaEnabled ? new PixelFormat(8, 0, 0, 4) : new PixelFormat());
I’ve googled it and they all said to change it to something different, that didn’t work. I load my fonts through this method:
public UnicodeFont setupFont(String fontName, int size, Color color) throws SlickException, FontFormatException, IOException{
InputStream inputStream = ResourceLoader.getResourceAsStream("project-assets/resources/fonts/" + fontName + "/value.ttf");
Font awtFont = Font.createFont(Font.TRUETYPE_FONT, inputStream);
UnicodeFont font = new UnicodeFont(awtFont, size, false, false);
font.addAsciiGlyphs();
font.addGlyphs(0x3040, 0x30FF);
font.getEffects().add(new ColorEffect(color));
font.loadGlyphs();
return font;
}
This is how it turned out: