6562639: Wrong pixel bounds from TextLayout with white font#28809
6562639: Wrong pixel bounds from TextLayout with white font#28809gredler wants to merge 3 commits intoopenjdk:masterfrom
Conversation
|
👋 Welcome back dgredler! A progress list of the required criteria for merging this PR into |
|
@gredler This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be: You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 175 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
Webrevs
|
prrace
left a comment
There was a problem hiding this comment.
all our existing normal tests passed, as well as the new one.
|
Does anyone have time to provide a second review on this PR before the end of the year? Phil has already verified that all tests pass. Thanks! |
mrserb
left a comment
There was a problem hiding this comment.
Seems the year in the header should be bumped =(
|
/integrate |
|
Going to push as commit 62181b6.
Your commit was automatically rebased without conflicts. |
One of the possible code paths for
TextLayout.getPixelBounds(...)actually draws the text on aGraphics2Dand checks the image pixels afterwards. The text is drawn over a white background, so if the user sets the font's foreground color to white then the text pixels cannot be detected (white on white).This PR fixes the issue by removing the code that sets the background to white, leaving the background as the default ARGB color (0 = transparent black). This does not cause a new problem for users who might set their font foreground color to transparent black, because transparent font foreground colors always return an empty bounds anyway (by virtue of being transparent).
The updated code should also be slightly faster since it's doing less work, though I haven't run any performance tests.
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/28809/head:pull/28809$ git checkout pull/28809Update a local copy of the PR:
$ git checkout pull/28809$ git pull https://git.openjdk.org/jdk.git pull/28809/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 28809View PR using the GUI difftool:
$ git pr show -t 28809Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/28809.diff
Using Webrev
Link to Webrev Comment