In one of my posting, I mentioned how, Emacs is able to render Devanagari script text flawlessly without any issue. But few days ago, I noticed that this is not true anymore. Rendering is not proper, probably something is broken between the builds, as I
emacs-cvs every two-three days. Following is the thumbnail of screenshot (click to enlarge) of issue I was facing.
I reported this issue on Emacs bugtracker. Anyways, I found a workaround against this issue after being pointed out by Kenichi Handa on how to view what font is used for rendering a particular character.
C-u C-x = is the keybinding, just move your
point to the desired character and do
C-u C-x =. On my box, Emacs was using
FreeSans (from GNU freefont) font to render the text. Probably, the appropriate font determination algorithm needs to be fixed in Emacs. Anyways, I hacked the following Emacs Lisp code for a workaround, which hints Emacs to use
Lohit Hindi-11 Xft font:
(defun my-setup-hindi-rendering() "Setup Hindi rendering" (interactive) (set-fontset-font "fontset-default" (cons (decode-char 'ucs ?\x0900) (decode-char 'ucs ?\x097f)) "Lohit Hindi-11"))
I’ve wrapped the code in
defun, because I’m looking for a proper fix. So whenever I need to fix that Devanagari script rendering issue, I do
M-x my-setup-hindi-rendering. Anyone who is experiencing similar issue, can try this and report any bugs. Happy operating Emacs system… ;)
UPDATE: As of now, this bug is fixed in Emacs CVS. I’m running
GNU Emacs 220.127.116.11 (x86_64-pc-linux-gnu, GTK+ Version 2.12.8) of 2008-05-29 on chateau .