[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Freebangfont-devel] Emacs support for Bengali display
From: |
Deepayan Sarkar |
Subject: |
Re: [Freebangfont-devel] Emacs support for Bengali display |
Date: |
Sun, 14 Mar 2004 07:43:05 -0600 |
User-agent: |
KMail/1.5.3 |
On Sunday 14 March 2004 04:58, Neil Jerram wrote:
...
> That said,
>
> - reordering in emacs lisp sounds about what I'd expect, if Emacs's
> preferred encoding is different from ISO10646
>
> - I'm surprised there's any issue to do with font source (TTF vs. BDF).
> I'd expect the X server to handle all this, then Emacs (or any other
> application) just sees the font as a generic X font.
Actually, it does matter when it comes to opentype fonts. Simple character
reordering is not enough; to form conjuncts and other typographical
features particular to indic languages, the rendering engine has to
analyze the character sequence, reorder them, and flag certain
combinations for certain lookups, and then go through a sequence of
lookups. A simple example of such a lookup will be to form the conjunct
between two consonants. These lookups are performed by Freetype, but the
data needed for the lookups (which lookup to call with what components)
have to be determined by the application (Emacs in this case).
Opentype/truetype fonts can have support for these lookups (i.e., when
freetype needs a glyph to represent the result of a particular lookup, it
knows where to find it in a truetype font -- and this location is
anonymous, it doesn't have to be in any particular codepoint for all
fonts, some lookups are even optional. I believe these glyphs are actually
stored in the unicode Private Use Area (PUA), but that's an implementation
detail).
I don't think BDF fonts can have any such lookup instructions. The best
that would be possible is to fix beforehand where each conjunct would be
located and use that knowledge to do the equivalent of opentype lookups
inside the Emacs code.
My guess is that this is how MULE handles Devanagari.
Deepayan
P.S.: opentype reordering/lookup details are described in
http://www.microsoft.com/typography/specs/default.htm
There are 3 GPL'd implementations -- yudit, pango and Qt (>=3.2). Of these,
yudit doesn't use freetype but has it's own rasterizer.