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

Fonts with contextual alternates are not correct rendered for font sizes less than 101 #307

Open
BuZZ-dEE opened this issue Feb 14, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@BuZZ-dEE
Copy link

BuZZ-dEE commented Feb 14, 2023

Pay attention to the e's, for example:

Amazon Corretto 8: wrong rendering for font size less than 101 and other wrong rendering for font size greater than 100
java-8_font_with_contextual_alternates_not_correct_rendering_below_font_size_100

Amazon Corretto 11-16, 19: wrong rendering for font size less than 101 and correct rendering for font size greater than 100
java-19_font_with_contextual_alternates_not_correct_rendering_below_font_size_100

Example code:
FontRederingErrorDemo.zip

Fonts with feature contextual alternates:

OS:

  • Linux:
lsb_release -a
LSB Version:	1.4
Distributor ID:	Arch
Description:	Arch Linux
Release:	rolling
Codename:	n/a

uname -a
Linux 5.11.15-zen1-2-zen #1 ZEN SMP PREEMPT Sat, 17 Apr 2021 00:22:34 +0000 x86_64 GNU/Linux
  • Windows 10

It would be great if this could be fixed for OpenJDK (for all sizes).

@BuZZ-dEE BuZZ-dEE added the bug Something isn't working label Feb 14, 2023
@BuZZ-dEE
Copy link
Author

@BuZZ-dEE
Copy link
Author

corretto/corretto-8#448

@yftsai
Copy link
Contributor

yftsai commented Feb 16, 2023

opened JDK-8302697

@BuZZ-dEE
Copy link
Author

BuZZ-dEE commented Jul 12, 2023

Workaround for font size less than 101:

Font font = new Font(fontName, Font.PLAIN, 100);
Map map = new HashMap();
map.put(TextAttribute.LIGATURES, TextAttribute.LIGATURES_ON);
font = font.deriveFont(map);

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants