简体   繁体   English

如何使Emacs文本像Netbeans一样清晰呈现

[英]How to get Emacs text to render as crisply as Netbeans

My setup: Microsoft Surface Pro (version 1), Windows 8.1, Netbeans 8.0, Emacs 24 我的设置:Microsoft Surface Pro(版本1),Windows 8.1,Netbeans 8.0,Emacs 24

I noticed that with any given font, in this case Consolas 14, the Netbeans text size is not only smaller, but super crisp on the display. 我注意到,对于任何给定的字体,在这种情况下Consolas 14,Netbeans文本大小不仅更小,而且在显示器上超级清晰。 On Emacs, Consolas 14 is huge and kinda blurry. 在Emacs上,Consolas 14是巨大的,有点模糊。 On other programs the text is also not as crisp as on Netbeans. 在其他程序中,文本也不像Netbeans那样清晰。 I'm aware there is sub-pixel stuff going on with cleartext, dithering, etc. 我知道有子像素的东西正在进行明文,抖动等。

So what is Netbeans doing, specifically to look this awesome? 那么Netbeans在做什么,特别是看起来很棒? Can I get Emacs to look the same? 我可以让Emacs看起来一样吗? Why is the text different size given the same pt size of 14? 为什么文本的大小与14的pt大小相同? How can I get the text to look like this in my programs (assuming on JVM)? 如何在我的程序中看到这样的文本(在JVM上假设)?

On a regular LCD monitor driven by Surface Pro, the Netbeans text looks a bit less crisp, but the size difference remains, so I attribute this to it being a somewhat lower quality monitor. 在由Surface Pro驱动的常规LCD显示器上,Netbeans文本看起来不那么清晰,但尺寸差异仍然存在,因此我认为这是一个质量稍低的显示器。

I can't necessarily answer your question of "what is Netbeans doing" per se, but I can offer one method for improving the appearance of emacs. 我不一定能回答你的问题“Netbeans在做什么”本身,但我可以提供一种方法来改善emacs的外观。

After a bit of research (mostly trial and error, honestly), I found the problem to be related to Windows and its "display scaling." 经过一些研究(主要是试验和错误,老实说),我发现问题与Windows及其“显示缩放”有关。 There are many discussions about display scaling on the SP[23] in general, including when connecting to an external display that is not high DPI, Windows is not offering independent scaling factors. 关于SP [23]的显示缩放很多 讨论 ,包括连接到高DPI的外部显示器时,Windows不提供独立的缩放因子。

The answer to your question is (I think) loosely related to that. 你的问题的答案是(我认为)与此松散相关。 I was adjusting Windows compatibility parameters (right-click on the emacs icon and select Properties then go to the Compatibility tab) for another application when I noticed some options that adjusted color modes (no effect) and DPI scaling (big effect). 当我注意到一些调整颜色模式(无效果)和DPI缩放(大效果)的选项时,我正在调整Windows兼容性参数(右键单击emacs图标并选择Properties然后转到Compatibility选项卡)以获取另一个应用程序。 After some comparisons, I found that checking Disable display scaling on high DPI settings provided a considerably better experience on my screen. 经过一些比较,我发现Disable display scaling on high DPI settings选中Disable display scaling on high DPI settings提供更好的体验。

Granted, it isn't "as good" as the same text displayed in, say, Microsoft Word, as really-close-up visual inspection may reveal. 当然,它并不像在Microsoft Word中显示的那样“好”,因为真正特写的视觉检查可能会显示出来。 Additionally, whenever I put emacs on my non-DPI external monitor, the menus and such as huge , but that's something else to deal with. 此外,每当我将emacs放在我的非DPI外部显示器上时,菜单等都是巨大的 ,但这是另外一些需要处理的事情。

In the image below, for comparison is some text in Microsoft Word (top 1) followed by three anti-aliasing options each without (middle 3) and with (bottom 3) the display scaling disabled. 在下图中,为了进行比较,Microsoft Word中的一些文本(前1个)后跟三个消除锯齿选项,每个选项没有(中间3)和(底部3)禁用显示缩放。 The Windows Properties window, Compatibility tab are overlaid for quick reference to what is set. “窗口Properties窗口的“ Compatibility选项卡将重叠,以便快速参考所设置的内容。 (One interesting side-effect is that the text is roughly 4% smaller now in addition to being much clearer.) Though this example is using the Ubuntu Mono font, it appeared to work equally well with Consolas. (一个有趣的副作用是文本现在除了更清晰之外大约小4%。)虽然这个例子使用的是Ubuntu Mono字体,但它似乎与Consolas一样好用。

在此输入图像描述

(Windows 8.1, SP3, emacs-24.4.1 from vgoulet .) (来自vgoulet的 Windows 8.1,SP3,emacs-24.4.1。)

This is simply an update on the answer by r2evans. 这只是r2evans对答案的更新。 In my version of Windows the Disable display scaling on high DPI settings option no longer exists. 在我的Windows版本中, Disable display scaling on high DPI settings选项不再存在。 Instead, there is an option to Override high DPI scaling behaviour. 相反,可以选择Override high DPI scaling behaviour. Setting this to Scaling performed by: System clears up the issue for me. 将此设置为Scaling performed by: System为我解决了问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM