如何阻止Emacs回归到光栅化的Unicode字符? [英] How to stop Emacs falling back to rasterized Unicode characters?

查看:129
本文介绍了如何阻止Emacs回归到光栅化的Unicode字符?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在设法建立一个很好的Agda环境,但是一个很大的障碍就是我的Emacs设置中Unicode符号的可读性。



我在Mac OS X 10.7使用Emacs(.app)23.3.1,并使用将默认字体配置为Monaco使用设置默认字体... 选项菜单。然而,对于Unicode等符号,如≠,和→它回落到一些严重的低分辨率光栅化字形,似乎不是摩纳哥或任何其他等宽字体我已经检查。这是阅读常见的Unicode重Agd源的一个巨大的可读性问题。



我如何使Emacs使用漂亮的TTF字形?



这是一个屏幕截图,显示Emacs缓冲区(右侧)中某些字符的放大视图,并将相同的字符粘贴到Font Book中,并显示在摩纳哥(左侧):



解决方案

将以下内容添加到我的 .emacs 中,根据这个超级用户答案

 (if(string-equal system-typedarwin)
(set-fontset-fontfontset-default
'unicode
'(Monaco iso10646-1)))

显然使用⌘-T字体选择菜单enou gh更改所有字符的字体,但这一点配置似乎会影响所有Unicode字符的显示方式。更好!



注意:对于Agda的目的,事实证明,门罗可能是比摩纳哥更好的选择,因为摩纳哥似乎缺乏像∀这样有用的角色。 p>

I'm trying to get a good Agda environment set up, but a big stumbling block is the readability of Unicode symbols in my Emacs setup.

I am on Mac OS X 10.7 with Emacs(.app) 23.3.1, and have configured my default font to Monaco using Set Default Font... from the Options menu. However, for Unicode symbols like ≤, ≠, and → it's falling back to some seriously ugly low-resolution rasterized glyphs that do not appear to be Monaco or any other monospace font I've checked. This is a huge readability problem for reading frequently Unicode-heavy Agda source.

How can I make Emacs use nice TTF glyphs instead?

Here's a screenshot showing a zoomed-in view of some characters in an Emacs buffer (on the right), and the same characters pasted into Font Book and displayed in Monaco (on the left):

解决方案

Adding the following to my .emacs solved the problem, based on this superuser answer:

(if (string-equal system-type "darwin")
    (set-fontset-font "fontset-default"
                      'unicode
                      '("Monaco" . "iso10646-1")))

Apparently using the ⌘-T font selection menu is not enough to change the font for all characters, but this bit of configuration seems to affect the way all Unicode characters are displayed. Much better!

N.B.: For Agda purposes, it turns out that Menlo might be a better choice than Monaco, as Monaco seems to lack such useful characters as ∀.

这篇关于如何阻止Emacs回归到光栅化的Unicode字符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆