Mac – Emacs unicode characters take up more vertical space

emacs

When I have the arrow (⇒) it takes up more vertical space in Emacs. So lines with this symbol have a different line height then the rest of my code. This really annoys me :).

I have the following font setting in my init.el
(set-face-attribute 'default nil
:family "Anonymous Pro" :height 110 :weight 'normal)

I'm using Emacs 24.2 on OS X (package from http://emacsformacosx.com/)

Is there a way to make all my lines the same height?

Best Answer

That SO answer shows how to define a font to render a character. In short

(set-face-attribute 'default nil :family "Consolas")
(set-fontset-font "fontset-default" '(#x6d4b . #x6d4c)
              "Microsoft YaHei" nil 'prepend)

And that other SO answer I made shows how to define which font to associate to a whole character set :

(create-fontset-from-fontset-spec
    "-*-consolas-*-*-*-*-12-*-*-*-*-*-fontset-consolas,
    ascii:-*-consolas-*-*-*-*-12-*-*-*-*-*-iso8859-1,
    latin-iso8859-1:-*-consolas-*-*-*-*-12-*-*-*-*-*-iso8859-1,
    latin-iso8859-15:-*-consolas-*-*-*-*-12-*-*-*-*-*-iso8859-15")

(setq default-frame-alist '((width . 100) 
   (height . 44) 
   (top . 50) ;pixels
   (left . 50) ;pixels
   (font . "fontset-consolas")
   ))
Related Question