Is it possible to use native fonts in AWT without specifically using a text
component? For example, if I just want to render in a Panel in the paint()
method, can I get it so that the font used is native rather than emulated by
Java's font renderer? The difference is always significant IMHO.
-phil.
[EMAIL PROTECTED] wrote:
- With Windows Display - Appearance - Effects font smoothing set to
ClearType, Monospaced bold 13 looks chunky in Swing (irrespective of Swing
anti-aliasing settings) and normal in AWT.
(By normal, I mean roughly identical to Windows Notepad. I cannot compare
JDK does use the system's Courier New as the primary
font for monospaced (the suggestion from another poster you are getting a
Lucida font is incorrect).
Ah, I thought it looked more like Courier New. Thanks for confirming.
What this appears to come down to is something MS are
doing to make
So why does AWT get the ClearType rendering? Does it drop down to native font
rendering?
The AWT components are the windows native components, and so
windows (GDI) does all their rendering, not just the text.
-phil.
Phil Race wrote:
font smoothing) then you'll see that notepad is bold. To see what I mean,
if you set Courier New Bold at pt size 16 (using 96 dpi) in windows
notepad,
Sorry, that should be 12 pt in windows, which == 16 pt in JDK
-phil
Phil wrote:
What this appears to come down to is something MS are doing to make
Courier New Bold look less bold, specifically in ClearType mode.
OK, I tried a few other monospaced fonts, and my two faves also have the same
problem:
http://www.jay.fm/files/consolas.png
The Lucida case looks marginally bolder in notepad .. so this isn't
exactly what
you were describing. I don't see much difference in the consolas one.
But 13 is a bad size to be sure to compare properly because it doesn't
exactly equate
12 pt in JDK/Font2DTest and 9 pt at 96 dpi in notepad
Don't you hate it when someone is a developer, but they run into an
end-user-type problem, and they post it to a developer forum anyway because
they know that's where they'll get the real answers? Yeah, me too. So anyway:
I've been using Eclipse for years on Windows XP SP2, no problems, but I