corretto/corretto-11

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

BuZZ-dEE opened this issue · 4 comments

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).

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