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 ∀.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With