-
Bug
-
Resolution: Fixed
-
P3
-
5.0u9, 5.0u6, 6u23
-
b08
-
x86
-
windows_xp
-
Verified
Depending on the character strings that should be drawn for printing, the following symptoms occurs:
1. mismatch between the drawing width and font metrics value.
2. output as image.
java.awt.Graphics2D#drawString(String, float, float)
1. If the parameter String contains one or more of the special symbols(after-
mentioned), the drawing result is different.
2. the expected result of the character strings should be a text. But if the parameter String contains one or more of the special symbols, the result is an image. This symptom can be confirmed by outputing the character strings using a printer driver which have the PDF output function.
3. If the parameter String does not contain the special symbols, a mismatch occurs between the width drawn and the width obtained by java.awt.FontMetrics#
getStringBounds(String, Graphics2D) or java.awt.FontMetrics#stringWidth(String). In this case, the output of the character strings is a text, not an image. The mismatch of the width is especially prominent in the japanese part of the character strings.
Special symbols:
the special symbols are the following:
,.?!)]}?????([{?-^?@;:?#$%&=?|`+*<>_
the UNICODE code point of these symbols is U+FFxx.
1. mismatch between the drawing width and font metrics value.
2. output as image.
java.awt.Graphics2D#drawString(String, float, float)
1. If the parameter String contains one or more of the special symbols(after-
mentioned), the drawing result is different.
2. the expected result of the character strings should be a text. But if the parameter String contains one or more of the special symbols, the result is an image. This symptom can be confirmed by outputing the character strings using a printer driver which have the PDF output function.
3. If the parameter String does not contain the special symbols, a mismatch occurs between the width drawn and the width obtained by java.awt.FontMetrics#
getStringBounds(String, Graphics2D) or java.awt.FontMetrics#stringWidth(String). In this case, the output of the character strings is a text, not an image. The mismatch of the width is especially prominent in the japanese part of the character strings.
Special symbols:
the special symbols are the following:
,.?!)]}?????([{?-^?@;:?#$%&=?|`+*<>_
the UNICODE code point of these symbols is U+FFxx.
- duplicates
-
JDK-6481117 With certain fonts the printed page shows protruding strings
-
- Closed
-
-
JDK-7014438 FontMetrics.stringWidth incorrect for multi-byte characters print
-
- Closed
-