b13 - Text antialiasing problems for TTF fonts (loaded via classloader)
I've been using UpdateN b13 and I'm really impressed with the fantastic looking font rendering on Windows Vista! Great job on the implementation!
I've noticed one issue - for the Java app that I'm building, I load TTF files from my hard drive, via a classloader. When I create fonts that are loaded in this way, the antialising/rendering of text doesn't look right. So it looks great for "system loaded fonts", but for custom fonts that I load, the text doesn't look right. I can copy the same exact TTF that Vista uses, and load it via a classloader and text rendering doesn't look right.
Here's the code I use:
String fontFile = "fonts/Segoe UI.ttf";
InputStream is = ClassLoader.getSystemResourceAsStream(fontFile);
Font font = Font.createFont(Font.TRUETYPE_FONT, is);
Do you know what's going on with the font rendering?
Also, I use SwingX components, and the font rendering on all of them is off... the default Swing text components look much better than their SwingX counterparts.