Re: [JAVA2D] Java2D/Swing problems w/small, bold ClearType fonts?

2007-09-13 Thread java2d
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.

--
And loving it,

-Q
_
[EMAIL PROTECTED]
(Replace the SixFour with numbers to email me)
[Message sent by forum member 'qu0ll' (qu0ll)]

http://forums.java.net/jive/thread.jspa?messageID=235360

===
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message signoff JAVA2D-INTEREST.  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message help.


Re: [JAVA2D] Java2D/Swing problems w/small, bold ClearType fonts?

2007-09-11 Thread Phil Race

-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 
Monospaced in Windows Notepad, since it doesn't exist, but I can compare it to Courier New, which 
is either really close or the same font under the covers.)




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).

What this appears to come down to is something MS are doing to make
Courier New Bold look less bold, specifically in ClearType mode.

If I look at it in either BW or greyscale antialiasing (aka windows
standard
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,
with set your windows font smoothing initially set to Standard, its
identical
to the JDK rendering of the same size (16 pt with AA or GASP in
Font2DTest).
But if you then change it to Cleartype in notepad the text gets
noticeably lighter.
But I see this only for Courier New Bold. Not all bold fonts.
Eg If I use Microsoft Sans Serif instead I don't see the same difference.
And Tahoma Bold also looks very bold in ClearType mode.

So it looks possible that MS special case Courier New Bold in cleartype
mode,
to make it look thinner , not even really bold. We'd have to look into
whether
we should do that too, but my initial opinion is that  the ClearType
rendering is
not true to the font.



Interestingly (to me, at least), but probably unrelated - I tried this with the Font2DTest demo, 
and discovered that antialiasing=default was the same as antialiasing=off, 
even though I'm running on Windows XP SP2 on an LCD display with ClearType turned on.  And that 
remained true even when I explicitly specified -Dawt.useSystemAAFontSettings=lcd on the command 
line.  You can see my Font2DTest chunky boldness here:
.


Font2DTest's 'default' means Java 2D's default behaviour, not the
desktop default ... and the value
of default historically and presently in Sun's JDK happens to be OFF.
We've talked about changing that so DEFAULT matches the desktop but have
been a bit
leery of the compatibility consequences.

-phil.

===
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message signoff JAVA2D-INTEREST.  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message help.


Re: [JAVA2D] Java2D/Swing problems w/small, bold ClearType fonts?

2007-09-11 Thread java2d
 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 Courier New Bold look less bold, specifically in
 ClearType mode.

Hmph.  I see what you mean.  I thought when I first ran into this I tried a 
bunch of monospaced fonts and had the same issues, but I didn't do such a 
detailed comparison of native/AWT/Swing.  I'll do that tonight and report back. 
 I explicitly remember testing Consolas and Lucida Console but I don't remember 
under what circumstances anymore.

 So it looks possible that MS special case Courier New
 Bold in cleartype mode, to make it look thinner , not even really bold. We'd
 have to look into whether we should do that too, but my initial opinion is 
 that
  the ClearType rendering is not true to the font.

So why does AWT get the ClearType rendering?  Does it drop down to native font 
rendering?

(Sorry if that's a novice question - I have about six minutes of Java 
development experience.)

 Font2DTest's 'default' means Java 2D's default behaviour, not the
 desktop default ... and the value of default historically and presently in 
 Sun's JDK
 happens to be OFF. We've talked about changing that so DEFAULT matches
 the desktop but have been a bit leery of the compatibility consequences.

NP, I just misunderstood what default meant, and assumed it to be the automatic 
detection of the system settings that I'd seen somewhere in the bug reports or 
release notes for J6u2.

Jay
[Message sent by forum member 'jay_levitt' (jay_levitt)]

http://forums.java.net/jive/thread.jspa?messageID=234913

===
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message signoff JAVA2D-INTEREST.  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message help.


Re: [JAVA2D] Java2D/Swing problems w/small, bold ClearType fonts?

2007-09-11 Thread Phil Race


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.

===
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message signoff JAVA2D-INTEREST.  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message help.


Re: [JAVA2D] Java2D/Swing problems w/small, bold ClearType fonts?

2007-09-11 Thread Phil Race

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

===
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message signoff JAVA2D-INTEREST.  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message help.


Re: [JAVA2D] Java2D/Swing problems w/small, bold ClearType fonts?

2007-09-11 Thread java2d
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
http://www.jay.fm/files/lucida-sans-typewriter.png

Thoughts?
[Message sent by forum member 'jay_levitt' (jay_levitt)]

http://forums.java.net/jive/thread.jspa?messageID=234960

===
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message signoff JAVA2D-INTEREST.  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message help.


Re: [JAVA2D] Java2D/Swing problems w/small, bold ClearType fonts?

2007-09-11 Thread Phil Race

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 would be better

-phil.

[EMAIL PROTECTED] wrote:

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
http://www.jay.fm/files/lucida-sans-typewriter.png

Thoughts?
[Message sent by forum member 'jay_levitt' (jay_levitt)]

http://forums.java.net/jive/thread.jspa?messageID=234960

===
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message signoff JAVA2D-INTEREST.  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message help.



===
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message signoff JAVA2D-INTEREST.  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message help.