很累寻找解决方案..
我在我的 php 项目中使用 PHPStorm IDE,但一个问题让我抓狂。
编辑器字体(编辑器,不关心界面)看起来很糟糕。我尝试过不同的发行版和不同的 DE,但结果总是相同的:(
有截图可以比较 Kate 和 PHPStorm 字体。我知道 PHPStorm 是一个 JAVA 应用程序,它使用不同的字体命中引擎,但是.. Eclipse 也是一个 JAVA 应用程序,但有非常漂亮的字体。
Windows 和 OSX 上的 PHPStorm 字体看起来像其他系统字体。流畅且可读。
有没有办法在我的眼睛爆炸之前解决这个字体问题?
谢谢。
So tired to search solution..
I use PHPStorm IDE for my php projects and one trouble just makes me crazy.
Editor fonts (editor, don't care about interface) looks horrible. I've tried on different distributions and different DE but result is always the same :(
There are screenshots to compare Kate and PHPStorm fonts. I know that PHPStorm is an JAVA application and it uses different font hitting engine, but.. Eclipse is an JAVA app too, but has pretty nice fonts.
PHPStorm fonts on both Windows and OSX looks like other system fonts. Smooth and readable.
Is there way to fix this font issue before my eyes will explode..?
Thanks.
发布评论
评论(9)
在 PhpStorm 问题之后,这是我添加到
phpstorm64.vmoptions
的内容(我已安装在/usr/local/bin/PhpStorm/bin/
中):我也做了在 FontForge 中打开字体的技巧:
我把它放在
~/fonts/
中,我运行的是 Ubuntu 12.10,毕竟,一切看起来都很棒(我是为 Ubuntu Mono 做的)。
我注意到的唯一问题是 -Dawt.useSystemAAFontSettings=gasp 导致编辑器字体渲染效果很好,但菜单和其他内容的渲染效果很差。而
-Dawt.useSystemAAFontSettings=lcd
为菜单提供了很棒的字体渲染,但在编辑器中的字体渲染不太好。因此,请尝试两者并选择您喜欢的一个。更新:在 Ubuntu 13.10 上,我不再有问题了。
Following the PhpStorm issue, here is what I added to
phpstorm64.vmoptions
(that I have installed in/usr/local/bin/PhpStorm/bin/
):I also did the trick of opening the font in FontForge:
I put it in
~/fonts/
I am running Ubuntu 12.10 and after all that, everything looks quite great (I did it for Ubuntu Mono).
The only problem I noticed is that
-Dawt.useSystemAAFontSettings=gasp
leads to great editor font rendering, but poor rendering for menus and other stuffs. Whereas-Dawt.useSystemAAFontSettings=lcd
gives awesome font rendering for menus, but less good font rendering in the editor. So try both and pick the one you prefer.Update: on Ubuntu 13.10, I have no problem anymore.
这是 Linux 特定问题,您可以在此处找到有关此问题的大量信息。检查评论中的各种建议和解决方法。
以下是使用不同字体可以获得的效果:
This is Linux specific issue, you can find a lot of information on this problem here. Check the comments for various suggestions and workarounds.
Here is what you can get with just a different font:
您可以安装 infinality 补丁并修补 OpenJDK,使其使用 freetype 进行字体渲染。
以下是有关为基于 Ubuntu 的发行版安装 infinality 和修补 OpenJDK 的链接:
http://www.webupd8.org/2013/06/better-font-rendering-in-linux-with.html
http://www.webupd8.org/ 2013/06/install-openjdk-patched-with-font-fixes.html
这是我在 Fedora 20 上运行 PHPStorm 的屏幕截图并修补了 OpenJDK:
You can install infinality patches and patch OpenJDK to make it use freetype for fonts rendering.
Here are links about installing infinality and patched OpenJDK for Ubuntu-based distributions:
http://www.webupd8.org/2013/06/better-font-rendering-in-linux-with.html
http://www.webupd8.org/2013/06/install-openjdk-patched-with-font-fixes.html
And here is my screenshot of PHPStorm running on Fedora 20 with infinality and patched OpenJDK:
尝试将 -Dawt.useSystemAAFontSettings=lcd 添加到 bin/phpstorm.vmoptions
Try adding -Dawt.useSystemAAFontSettings=lcd to bin/phpstorm.vmoptions
尝试设置->编辑->外观->使用抗锯齿字体
Try Settings -> Editor -> Appearance -> Use anti-aliased font
我发现的最好的解决方案是使用 FontForge。
FontForge 它是一个 Linux 应用程序,允许您编辑一些字体首选项。
只需在应用程序中打开 ttf 字体即可。
按 ctrl+a 选择所有字符。然后从菜单中选择“提示”->“清晰的提示。然后提示->清晰的指示。最后一个文件 ->生成字体。只需将新字体另存为新字体或替换现有字体,然后尝试在 PhpStorm 中使用此字体。看起来不太理想,但比以前好多了。
The best solution I've found is to use FontForge.
FontForge it's a linux application which allows you to edit some font preferences.
Just open ttf font within app.
Press ctrl+a to select all chars. Then choose from menu Hints -> Clear Hints. Then Hints -> Clear Instructions. And last File -> Generate Fonts. Just save the new font as new or replace existing and try to use this font with PhpStorm. Looks not ideal but much better than before.
我还注意到深色背景上的字体在 Linux 中看起来相当不错
Also I've noticed that fonts on a dark background looks pretty good in Linux
在我的 Debian-Squeeze 盒子上并排比较 NetBeans 和 PhpStorm,我发现即使选择相同的字体和字体大小,NetBeans 看起来也要好得多。不同之处在于 PhpStorm 将大部分代码加粗。在完成编辑器配置并删除所有粗体之后,编辑器现在看起来好多了。
Comparing NetBeans and PhpStorm side by side on my Debian-Squeeze box and I found NetBeans looked much better even when the same font and font-size was selected. The difference was that PhpStorm had bolded most of the code. After going through the editor configuration and getting rid of all the bolding the editor looks much better now.
对于 WebStorm,我认为等宽和抗锯齿效果很好。
Monospaced with anti-aliasing looks good to me for WebStorm.