Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display is abnormal in jdk17 #525

Open
highgozhangyc opened this issue Dec 6, 2023 · 0 comments
Open

Display is abnormal in jdk17 #525

highgozhangyc opened this issue Dec 6, 2023 · 0 comments
Labels

Comments

@highgozhangyc
Copy link

Description
In jdk 17, after selecting a string, the characters are displayed on top of the background color, and there is no gap between the characters and the top of the background color. However, in jdk8, there is a gap between the characters and the top of the background color. The problem this brings is that when the characters I use are Chinese, I will find that the selected characters exceed the background color range.

Steps to Reproduce
Specific steps to reproduce the behavior:

  1. Use jdk8 to run the demo program, and then enter Chinese in the editor;
  2. Use jdk17 to run the demo program, and then enter the same content as in the first step in the editor;
  3. Observe the gap between the top of the characters and the selected background color when selecting content in the editor in the two scenarios;

Expected behavior
In both scenarios, the distance between the top of the selected character and the background color area is the same

Actual behavior
In the two scenarios, the gap between the top of the selected character and the selected background color is different. The gap is very small under jdk17, which will cause the selected character to exceed the background color area when the selected content is Chinese.

Screenshots
jdk 17:
image

jdk8:
image

Java version
jdk8 & jdk17

Additional context
Add any other context about the problem here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant