简体   繁体   English

覆盖Emacs 23字体替换

[英]Overriding Emacs 23 font substitutions

I use emacs with org-mode and other packages that assume all characters have the same width. 我使用带有org-mode的emacs和其他假设所有字符具有相同宽度的包。 This was not problematic until I started using Emacs 23 (on Mac and Linux) instead of Carbon Emacs. 在我开始使用Emacs 23(在Mac和Linux上)而不是使用Carbon Emacs之前,这不成问题。 Now many non-ASCII characters (such as the phonetic characters in 0250–02AF) are rendered with a different font with different metrics. 现在许多非ASCII字符(例如0250-02AF中的语音字符)使用具有不同度量的不同字体呈现。 I would like to force emacs to render these characters with the same font as ASCII characters, eg DejaVu Sans Mono 10. How can this be achieved? 我想强制emacs使用与ASCII字符相同的字体呈现这些字符,例如DejaVu Sans Mono 10.如何实现? Where is the documentation relating to emacs fonts in never versions located? 哪些文档与永远版本中的emacs字体有关?

Try 尝试

(set-fontset-font
 nil '(#x0250 . #x02af) (font-spec :family "DejaVu Sans Mono"))

You can move the cursor (point) over the phonetic character and do a Cu Cx = to run some version of what-cursor-position . 您可以将光标(点)移动到拼音字符上并执行Cu Cx =来运行某个版本的what-cursor-position This will open another buffer containing information about what is under the cursor - including a line containing face and a descriptionof what face is used. 这将打开另一个缓冲区,其中包含有关光标下的内容的信息 - 包括包含face的线条和使用的面部描述。 Remeber the name of the face used. 记住所用脸部的名称。

Then, call Mx customize-face and enter the remembered used face and customize it to your needs. 然后,调用Mx customize-face并输入记住的已用面并根据您的需要进行自定义。

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

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