Skip to main content

Font rendering bug in Update 10?

7 replies [Last post]
cowwoc
Offline
Joined: 2003-08-24
Points: 0

Please compare http://bbs.darktech.org/tahoma11.png and http://bbs.darktech.org/tahoma12.png

In the sample code I am simply changing the font of a JTextArea from Tahoma 11 to Tahoma 12. The underlying font only defines sizes 10 and 12 which is probably why 11 renders incorrect as bigger than 12. Should I file a bug report for this? Can anyone reproduce the problem on their end?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
cowwoc
Offline
Joined: 2003-08-24
Points: 0

Netbeans developers have replied this is a bug on their end (not the JDK) so I'm closing this issue. Thank you everyone!

cowwoc
Offline
Joined: 2003-08-24
Points: 0

Reopening until we figure out if this is a JDK or Netbeans bug.

loubs001
Offline
Joined: 2006-01-05
Points: 0

We're looking at the text "Lack of Spacing..." right? In the first pic (11), that doesnt look like Tahoma at all to me. Looks like Courier. Are you sure you set the font correctly?

cowwoc
Offline
Joined: 2003-08-24
Points: 0

Good catch! I tracked this down to a bug in the Netbeans form editor. It seems that with Tohoma 11 it doesn't add a setFont() instruction to the code, so it displays one thing in the Form editor and another thing at runtime.

cowwoc
Offline
Joined: 2003-08-24
Points: 0

This bug only occurs if I have "UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());" before initComponents(). If I move it after initComponents() the problem goes away.

It isn't clear why this is the case.

PS: I filed http://www.netbeans.org/issues/show_bug.cgi?id=137919

mbien
Offline
Joined: 2007-04-29
Points: 0

> It isn't clear why this is the case.
NetBeans Form Designer only sets values when value != default value. Changing L&F manually also changes the default font... but nb isn't aware of the fact that you changed the L&F in code.

cowwoc
Offline
Joined: 2003-08-24
Points: 0

Turns out it might not be that simple. Netbeans works fine with Java5 or Java6 update 6 but not with update 10. This is beginning to sound like a possible JDK bug to me. Please see the testcase I've attached to the Netbeans bug report.