dmort27
dmort27

Reputation: 31

Overriding Emacs 23 font substitutions

I use emacs with org-mode and other packages that assume all characters have the same width. This was not problematic until I started using Emacs 23 (on Mac and Linux) instead of Carbon Emacs. Now many non-ASCII characters (such as the phonetic characters in 0250–02AF) are rendered with a different font with different metrics. I would like to force emacs to render these characters with the same font as ASCII characters, e.g. DejaVu Sans Mono 10. How can this be achieved? Where is the documentation relating to emacs fonts in never versions located?

Upvotes: 3

Views: 398

Answers (2)

huaiyuan
huaiyuan

Reputation: 26549

Try

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

Upvotes: 1

phimuemue
phimuemue

Reputation: 36051

You can move the cursor (point) over the phonetic character and do a C-u C-x = to run some version of 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. Remeber the name of the face used.

Then, call M-x customize-face and enter the remembered used face and customize it to your needs.

Upvotes: 0

Related Questions