-
Bug
-
Resolution: Fixed
-
P5
-
22
-
b18
-
b27
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 forJDK-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
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
- Resolved
- links to
-
Commit(master) openjdk/jdk/faa109e8
-
Review(master) openjdk/jdk/22549