[OS X Emacs] Rendering Devanagari (Unicode) correctly?

Richard Cobbe cobbe at ccs.neu.edu
Tue Dec 20 19:39:58 EST 2011


On Tue, Dec 20, 2011 at 11:14:45AM +0100, Peter Dyballa wrote:
>
> Am 20.12.2011 um 04:36 schrieb Richard Cobbe:
>
> >> This screen-shot shows your file in three variants of almost the same code basis:
> >
> > Of the three, only the right-hand one is correct.
>
> Because the line is so well connected? This could come from the font used...

The biggest problem is the last two characters: only the AppKit version
gets them in the right order.  (The last character in the file I sent is
U+093F, and if you check the code charts, you'll see that it's a combining
diacritical that is displayed above and to the *left* of the character it
modifies, as AppKit correctly renders.)

You may be right that it's a font issue.  (I have very little understanding
of how this kind of stuff is implemented in modern fonts, so forgive me if
I'm off-track here.)  To my knowledge, I have two fonts on my system that
support these code points: Devanagari MT, and Sanskrit 2003.  In Apple's
TextEdit.App, the string renders correctly in Devanagari MT, but not in
Sanskrit 2003.

However, based on the shape of the glyphs, it appears that Emacs is using
Devanagari MT.  Further, I haven't configured Emacs to use a particular
font for these code points; it just worked with OS X behind the scenes to
choose one.  When I tried the other font (by temporarily disabling
Devanagari MT in Font Book & restarting Emacs), though, I get the same
rendering problems.  So there appear to be some differences between the
fonts, but not in a way that affects Emacs's rendering.

> Anyway, the AppKit Emacs uses almost completely the technology of Mac OS X (to display SVG graphics it seems to need librsvg2). So in theory it should produce a display similar to that of TextEdit.
>
> It's likely that some time after GNU Emacs 24.1 will be released there'll be a large patch file and extra source files to upgrade the now stable GNU Emacs 24 to AppKit GNU Emacs 24. Right now there doesn't seem to exist a volunteer to offer the AppKit variant for download. YAMAMOTO Mitsuharu claims that his variant is not stable and ready for daily use. This can have been true last year, but recently I could compile very reliable applications – on Tiger, Leopard, and Snow Leopard. (BTW, almost every month a new patch file and set of extra source files is released.)
>
> Building AppKit Emacs is quite simple – in some existing Emacs. With TRAMP you can get the source file archives. In a *shell* buffer they can be out-packed onto disk, merged (some renaming needed), and then patched. With the Emacs command "compile" (M-x compile RET) you first start to configure and then compile. Building the self-contained application (or a "distributed" installation that shares most installed files between AppKit, X11, and NS variants) can be performed similarly. You need to install Xcode.

I've already got XCode installed, so we're on the right track.  :-)

I appear to have TRAMP built into the Emacs I'm currently using.  Since I'm
a software engineer by profession, I'm reasonably confident that I'll be
able to handle the unpacking, merging, and patching.  I am, however, having
a surprising amount of difficulty finding the files I need -- both you and
David Reitter refer to YAMAMOTO Mitsuharu's instructions, but I've been
unable to find them, either on emacs-devel via gmane, or just via google.
Where should I be looking for these?

(Do forgive me -- the last time I built Emacs from source was about 12
years ago, on a Solaris machine, so I'm a little out of the habit.  <grin>)

Thanks,

Richard



More information about the MacOSX-Emacs mailing list