Details
-
Bug
-
Resolution: Fixed
-
P4
-
1.4.0, 1.4.1, 1.4.2, 1.4.2_03, 5.0
-
b53
-
generic, x86
-
generic, windows_98, windows_2000, windows_xp
Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2131287 | 5.0u7 | Igor Nekrestyanov | P4 | Resolved | Fixed | b01 |
Description
FULL PRODUCT VERSION :
java version "1.4.1"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-b21)
Java HotSpot(TM) Client VM (build 1.4.1-b21, mixed mode)
FULL OPERATING SYSTEM VERSION :
Windows Millennium [Version 4.90.3000]
A DESCRIPTION OF THE PROBLEM :
Clarification up front:
"MS Sans Serif" (sserife.fon) is a bitmap font.
Bitmap fonts are not supported by Java2D.
"Microsoft Sans Serif" (micross.ttf) is a true type font.
True type fonts ARE supported by Java2D.
---
When using the "Microsoft Sans Serif" true type font at
size 8 (Windows) / 11 (Java), certain characters/glyphs
are not rendered properly by the Java2D system.
Examples:
CMQx89 (PLAIN)
MQUWcoswxy0689,*~ (BOLD)
The rendered glyphs for these characters look noticeably
broken. As this is not Bugzilla, I cannot attach a screenshot
of how they differ from the native rendering supplied by
Windows.
The correct look can be seen in a native Windows application
such as Wordpad with the font set to "Microsoft Sans Serif",
size 8.
---
Additional points:
* "Microsoft Sans Serif" is the font used by the Classic theme
in Windows 2000. At size 8, it also looks identical to the
old "MS Sans Serif" bitmap font that's been in use since
Windows 95.
"Microsoft Sans Serif" is what many users still use as their
default font and without this bug being fixed there's no way
to properly deploy it in a Swing application.
* Again, this bug is not complaining about bitmap fonts or
how those are substituted. Therefore, this is NOT a duplicate
of bug 4640557.
* Bug 4533223 fixed the issue of spaces displaying as dots
but it did not fix the (other) broken glyphs.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run the attached test case and compare the output
to the native font rendering that can be seen in
a native Windows app such as Wordpad with the font
set to "Microsoft Sans Serif", size 8.
EXPECTED VERSUS ACTUAL BEHAVIOR :
Expected: Glyphs should be indistinguishable from native
rendering.
Actual: Glyphs look broken.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.awt.*;
import javax.swing.*;
public class MSFontTest extends JFrame {
public MSFontTest() {
super("MSFontTest");
JPanel pnl = new JPanel();
pnl.setLayout(new GridLayout());
JTextArea textArea1 = new JTextArea();
textArea1.setFont(new Font("Microsoft Sans Serif", Font.PLAIN, 11));
textArea1.setText("Microsoft Sans Serif size 8 (Java: 11)\n\nCMQx89");
pnl.add(new JScrollPane(textArea1));
JTextArea textArea2 = new JTextArea();
textArea2.setFont(new Font("Microsoft Sans Serif", Font.BOLD, 11));
textArea2.setText("Microsoft Sans Serif size 8 (Java: 11)
BOLD\n\nMQUWcoswxy0689,*~");
pnl.add(new JScrollPane(textArea2));
setContentPane(pnl);
setSize(new Dimension(540, 100));
show();
}
public static void main(String[] args) {
new MSFontTest();
}
}
---------- END SOURCE ----------
(Incident Review ID: 179626)
======================================================================
###@###.### 2004-01-15
2 CAP members complains the about distorted text in
Java Control Panel in the About section. Notice the
"C" and "8" text.
Attachments
Issue Links
- backported by
-
JDK-2131287 Microsoft Sans Serif (True Type) font is not rendered properly
-
- Resolved
-
- duplicates
-
JDK-4923677 Microsoft Sans Serif "8" rendered differently in 1.4.x
-
- Closed
-
-
JDK-4975634 REGRESSION: (WinL&F) distorted text on Window Look and Feel
-
- Closed
-
-
JDK-5053211 Bad glyph rendering spoils apearance of applications under Windows LAF
-
- Closed
-
-
JDK-4919654 Capital C with Microsoft Sans Serif looks different from native
-
- Closed
-
-
JDK-5093711 fonts look different to native fonts
-
- Closed
-
-
JDK-5106890 Wrong rendering of letter "C"
-
- Closed
-
- relates to
-
JDK-6320271 Glitches in bold Microsoft Sans Serif
-
- Open
-
-
JDK-6400685 Font2DTest.jar is failing for Arabic-Majalla UI on Windows-Vista
-
- Resolved
-
-
JDK-6282527 LCD text artifacts due to T2K (font rasteriser) scan conversion of contour to glyph image.
-
- Resolved
-
-
JDK-6320262 Q in Microsoft Sans Serif is different from native
-
- Closed
-
-
JDK-4908060 First character in text field gets cut ('j' appears as 'i')
-
- Closed
-