-
Bug
-
Resolution: Unresolved
-
P5
-
22
-
b18
The characters in Document diagrams for the insert and remove methods aren't in the middle of the boxes [1].
Indeed, at 200% scale and Arial font, there are 6 pixels on top of ‘T’ and ‘h’, but there are 8 pixels on the bottom of ‘q’. If I use Calibri font, the values are 8 and 9 pixels correspondingly [2].
Moving the text position by 0.5 seems to help, and the values become equal: 7 on either side [3].
This issue was raised during code review for JDK-8337287:
https://github.com/openjdk/jdk/pull/20376
[1] https://github.com/openjdk/jdk/pull/20376#issuecomment-2307945039
[2] https://github.com/openjdk/jdk/pull/20376#issuecomment-2353728939
[3] https://github.com/openjdk/jdk/pull/20376#issuecomment-2353743533
Indeed, at 200% scale and Arial font, there are 6 pixels on top of ‘T’ and ‘h’, but there are 8 pixels on the bottom of ‘q’. If I use Calibri font, the values are 8 and 9 pixels correspondingly [2].
Moving the text position by 0.5 seems to help, and the values become equal: 7 on either side [3].
This issue was raised during code review for JDK-8337287:
https://github.com/openjdk/jdk/pull/20376
[1] https://github.com/openjdk/jdk/pull/20376#issuecomment-2307945039
[2] https://github.com/openjdk/jdk/pull/20376#issuecomment-2353728939
[3] https://github.com/openjdk/jdk/pull/20376#issuecomment-2353743533
- relates to
-
JDK-4622866 javax.swing.text.Document.remove(int, int) has a misleading picture
- Resolved
-
JDK-8337287 Update image in javax.swing.text.Document.insert
- In Progress