Skip to main content

Fonts looking not so great in Update 10

5 replies [Last post]
Joined: 2006-01-05

I know that JDK6u10 is using the native rasterizer for fonts now, and I've seen that the feedback has been very positive ( Well, maybe its just me, but the fonts look much stronger than they should be, in fact they almost look blurry. It doesnt match the native Windows look at all.

I've attatched a screenshot from Windows XP that shows a JDK6u10-beta-b23 JFileChooser, versus a file dialog from NotePad. You can see the text in the NotePad version is much lighter and easier to read.

Am I alone in this opinion?

And if the native rasterizer is in use, why the difference. Is there a contrast setting that needs adjusting?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2003-12-31

Whichever is easier to read is debatable, but you're right, there should be
no difference. On my system they are identical.

However, in some places in your your screenshots the fonts are actually different
(like in the panel on the left side). The font in the pane itself appears to be
the same though.

I know it sounds silly, bug are you absolutely sure you're running on 6u10?

Phil will need to take a closer look.


Joined: 2006-01-05

Thanks for the quick response. The good news is I just tried it on my various home machines (a mix of Vista and XP) and they all look perfect! Maybe there's something specific to my work machine thats causing the text to come out strange. When I get in tomorrow I'll have another look.

Joined: 2003-06-09

The text contrast appears significantly different.
My guess is that we aren't picking up the right value. We should and always have
done this so I'm not sure why its going wrong now. Looks like you have it set to
a high value, ie "2.2" but JDK is using a much lower value.

I'd like to see what your system thinks it should be.
First run "regedit" and go to "HKEY_CURRENT_USER->Control Panel->Desktop
under there you will see an item "FontSmoothingGamma", report what it value
is as hexadecimal and decimal. Eg the default values would say
0x0000578 (1400)
you can now quit regedit.

Next open Control Panel and see if you have the "ClearType Tuning" control installed.
If not you can download it from
Bring it up and look on the "Advanced" tab and see what the "Contrast Setting".
The default on XP is 1.4. I'd be interested to know what it is on your system.
I suspect its 2.2, because your native text is so light, but confirmation would
be helpful. It could also be that its some weird out of bounds value and we
default to clamping it in a different manner than GDI is doing.


PS The font in the list of files looks to be the same font in both cases, but the font
used for the other labelled icons, menus etc is different in the two cases.
That's likely an issue with Swing not using the right font.

Joined: 2006-01-05

Hi Phil,

I'm completely baffled by this, something strange is going on here, but after fiddling with it for a while, atleast now I've managed to get [i]consistent[/i] behaviour, even if I cant explain it.

I checked the registry, and the first thing I noticed was I didnt have a "FontSmoothingGamma" key at all! It had "FontSmoothing", "FontSmoothingType" and "FontSmoothingOrientation", but not gamma. Odd. But I ran the utility you linked to, and that created the key. I expected that would solve the problem, but it wasnt to be...

This is where it gets weird. If use the utility to set the gamma to 1.4, and then launch any Java app, the fonts look too strong as I showed you in the screenshot. But, if I set to the gamma to 1.3 and THEN launch the app, the fonts look fine! If i set the gamma to 1.5 and then launch, it looks fine! Or any other setting for that matter, it always looks just like native Windows. But then I try 1.4 again, launch, and it looks bad. This seems to happen only for the 1.4 setting.

It gets weirder still, where if I launch the app with any gamma setting other than 1.4, and then use the utility to adjust the gamma to 1.4 while the app is still running, the Java app updates to reflect the change, and looks just fine! But then i close it, launch it again without touching the gamma, and it looks bad again. What the...?

You are definitely always picking up the right value. I print out the value awt.font.desktophints and add a PropertyChangeListener to the Toolkit to detect changes, and it always gets it right.

This bizarre problem seems to only be happening on this laptop (with some Intel chipset that I think causes D3D to be disabled**, if that makes a difference). Ive restarted twice and its still happening.

So I just about give up trying to understand this. It seems to be limited to this machine, and I'm able to get text that looks fine just by using a gamma setting of 1.3 or 1.5, and I'm happy with that.

Thanks for your help guys.


** Output with J2D_TRACE_LEVEL=4:
[E] D3DPPLM::CheckForBadHardware: found matching hardware: VendorId=0x8086 DeviceId=0xffffffff
[E] D3DPPLM::CheckForBadHardware: bad hardware found, device disabled
[E] D3DPPLM::GDICheckForBadHardware: no suitable devices found

Joined: 2004-08-15

I am seeing identical behaviour on my work PC:

Intel 82945G Express Chipset Family