04 August 2008

Gentium in Emacs via Unicode

I spent a little time over the weekend tweaking my Carbon Emacs configuration. When I first started using it I had to spend several interesting hours to get it to use a Mac-ish font large enough that I didn't go blind. I settled on a 15 point Vera Sans Mono. Unfortunately, the Greek that it picks for this isn't so nice. So with a little more digging, I managed to get Emacs to use Gentium for the Greek, but it had to be tweaked a bit for size:


;;; Greek extended
(set-fontset-font
"fontset-default"
(cons (decode-char 'ucs #x1f00)
(decode-char 'ucs #x1fef))
"-apple-gentium-medium-r-normal--18-180-72-72-m-180-iso10646-1")

;; "Greek and Coptic" U+0374 - U+03FB
(set-fontset-font
"fontset-default"
(cons (decode-char 'ucs #x0374)
(decode-char 'ucs #x03fb))
"-apple-gentium-medium-r-normal--18-180-72-72-m-180-iso10646-1")


Yes, it really does take an 18 point Gentium to match a 15 point Vera Sans Mono.

My next step was to tweak the fontset to include Cuneiform (via the nice Neo-Assyrian Assurbanipal font), but MULE, Emacs' internationalization library, chokes on Unicode code points in in the 0x12000's where Cuneiform lives. I suppose my commentary on the Enûma Eliš focused on interpretive dance will have to wait.