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

font rendering of jbr17 is different from jbr11 #231

Open
ViTess opened this issue Apr 20, 2023 · 2 comments
Open

font rendering of jbr17 is different from jbr11 #231

ViTess opened this issue Apr 20, 2023 · 2 comments

Comments

@ViTess
Copy link

ViTess commented Apr 20, 2023

I use android studio in ubuntu 18.04, here is the version info:

Build #AI-222.4459.24.2221.9862592, built on March 31, 2023

Runtime version: 17.0.6+0-17.0.6b802.4-9586694 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.

My font is courier new, and added -Dawt.useSystemAAFontSettings=lcd and -Djava2d.font.loadFontConf=true in vmoptions

jbr17:
2023-04-20 11-20-51-1

jbr11:

Runtime version: 11.0.11+0-b60-7590822 amd64

2023-04-20 11-26-57

How to make font rendering like jbr11 under jbr17?

@joshuataylor
Copy link

You might want to try one of these options:

System Property Value   | java.awt.RenderingHint value
"off"|"false"|"default" : VALUE_TEXT_ANTIALIAS_DEFAULT
"on"                    : VALUE_TEXT_ANTIALIAS_ON
"gasp"                  : VALUE_TEXT_ANTIALIAS_GASP
"lcd"|"lcd_hrgb"        : VALUE_TEXT_ANTIALIAS_LCD_HRGB
"lcd_hbgr"              : VALUE_TEXT_ANTIALIAS_LCD_HBGR
"lcd_vrgb"              : VALUE_TEXT_ANTIALIAS_LCD_VRGB
"lcd_vbgr"              : VALUE_TEXT_ANTIALIAS_LCD_VBGR

You can also try editing /etc/profile.d/freetype2.sh

@ViTess
Copy link
Author

ViTess commented Apr 23, 2023

You might want to try one of these options:

System Property Value   | java.awt.RenderingHint value
"off"|"false"|"default" : VALUE_TEXT_ANTIALIAS_DEFAULT
"on"                    : VALUE_TEXT_ANTIALIAS_ON
"gasp"                  : VALUE_TEXT_ANTIALIAS_GASP
"lcd"|"lcd_hrgb"        : VALUE_TEXT_ANTIALIAS_LCD_HRGB
"lcd_hbgr"              : VALUE_TEXT_ANTIALIAS_LCD_HBGR
"lcd_vrgb"              : VALUE_TEXT_ANTIALIAS_LCD_VRGB
"lcd_vbgr"              : VALUE_TEXT_ANTIALIAS_LCD_VBGR

You can also try editing /etc/profile.d/freetype2.sh

@joshuataylor Thanks for your reply, but I don't think it's about Hint, it looks like the spacing is different
After I set OPENJDK_FFS_LOG_FC=yes, jbr17 log:

FC_LOG: Courier New /usr/share/fonts/winfonts/cour.ttf size=15.921875 - CACHED
FC_LOG: FC_HINTING(0) FC_HINT_SLIGHT JDK_AA_LCD_HRGB FC_ANTIALIAS(1) FC_AUTOHINT(0) FC_LCD_DEFAULT

jb11 log:

FC_LOG: Courier New /usr/share/fonts/winfonts/cour.ttf size=15.921875
FC_LOG: FC_HINTING(0) FC_HINT_SLIGHT JDK_AA_LCD_HRGB FC_ANTIALIAS(1) FC_AUTOHINT(0) FC_LCD_DEFAULT

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

No branches or pull requests

2 participants