I’m writing a simple java.awt.Font wrapper for my jogl application which renders all characters to a texture and maps these to quads in runtime. Unfortunately I can’t figure out how to get a complete list of available glyph mappings from my font object. Isn’t this possible?
For now, as a cheesy alternative, my wrapper class only support the 256 ascii characters by doing a simple for-loop like this
for( int i = 0; i < 256; i++ ) {
if( font.canDisplay( (char)i ) ) {
// render character to backbuffer and record texture coordinates
}
}
This works fine, but i really want to support unicodes aswell (without having to go through all 64k characters). Hope someone has some insight