提示:适用于webstorm等jetbrains家的IDE
I’m on a high-dpi display and I got it working with a perfect font rendering, to achieve this you need to:
(On Linux only) Install and use Oracle JDK (I’m using 1.7) and not OpenJDK (also the patched one with fontfix was useless for me). See how to do this.
Edit the .vmoptions configuration file that you find into the Bin installation folder (eg.studio.vmoptions and for 64bit studio64.vmoptions, or WebStorm.exe.vmoptions etc. according to the version of the IDE you installed) by adding these lines:
-Dawt.useSystemAAFontSettings=on
-Dswing.aatext=true
-Dsun.java2d.xrender=true
Remove hinting informations from the font that you would like to use and select the new font intoIntelliJ IDEA preferences (Setting -> Editor -> Font);
if you don’t know how to do this, install FontForge then:- Open your font in FontForge
- Select all glyphs via
Ctrl+A
and clear all hints (Hints -> Clear Hints) - Select glyphs again and use Hints -> Clear Instruction
- Save the font with different name ( File -> Generate Fonts)
- Install the new font, select it in IDEA
If you followed the above tips and you’re experiencing lags when fast scrolling the code (this sometimes could happen on Linux distributions with a not optimized gpu driver), try removing the line-Dsun.java2d.xrender=true
from the .vmoptions file.