-
Bug
-
Resolution: Unresolved
-
P4
-
6
-
x86
-
windows_98, windows_nt, windows_2003
4950968 reports a problem with Java displaying some Windows fonts too small. This has turned out to be an issue that needs to be fixed by AWT. However, in the interest of safety at this point in the release, Swing is working around the issue for now. This bug is being opened to track the root cause which we (Swing) still need a fix for. Most of the details of the problem can be seen in 4950968, but I'll do a quick summary here.
On Windows, those fonts known as "raster" fonts (ex. MS Sans Serif) are not scaled. When the Windows font mapper translates from a logical font to a physical font, it looks for the best match. With raster fonts, it chooses the closest available size supported by the font (although it may be more complex than this). So, for example, if a native application asks for MS Sans Serif 6, it will instead get MS Sans Serif 8 which is the lowest size supported by that font.
What AWT returns to Java however is simply the size specified in the logical font structure. In the example above, this would be 6. This isn't sufficient since, in order to match the platform in Swing, we need to know what size Windows would render the font at.
What we need then is when a raster font is being queried, for AWT to find out details of the physical font that Windows would select for the given logical font.
On Windows, those fonts known as "raster" fonts (ex. MS Sans Serif) are not scaled. When the Windows font mapper translates from a logical font to a physical font, it looks for the best match. With raster fonts, it chooses the closest available size supported by the font (although it may be more complex than this). So, for example, if a native application asks for MS Sans Serif 6, it will instead get MS Sans Serif 8 which is the lowest size supported by that font.
What AWT returns to Java however is simply the size specified in the logical font structure. In the example above, this would be 6. This isn't sufficient since, in order to match the platform in Swing, we need to know what size Windows would render the font at.
What we need then is when a raster font is being queried, for AWT to find out details of the physical font that Windows would select for the given logical font.
- relates to
-
JDK-6210994 Rounding error in Windows L&F prevents usage of embeded bitmaps for some font sizes
- Open
-
JDK-4950968 JFileChooser and Win LAF: File list font too small to be readable on Win NT/98
- Resolved