[XeTeX] Trouble with displaying word containing 3 conjunct consonants in Devanagari
Benct Philip Jonsson
bpj at melroch.se
Mon Sep 21 15:22:41 CEST 2009
Ravi Parimi skrev:
> On Sun, Sep 20, 2009 at 11:30 AM, Benct Philip Jonsson <bpj at melroch.se> wrote:
>> Ravi Parimi skrev:
>>> Hi,
>>>
>>> I'm using xelatex Version 3.1415926-2.2-0.999.6 (Web2C 7.5.7) on Max
>>> OSX 10.5.8 with Devanagari MT.
>>>
>>> There's a word that contains the following sequence of letters: ङ् ख्
>>> ये (which is zf + Kf + ye using the devanagri qwerty keys). When run
>>> through xelatex, I see that the final य (y) doesn't merge into the
>>> previous two letters. Instead, I see a halant character intervening
>>> the first two letters (ङ् + ख्) and the final letter (य).
>> Are you sure the conjunct exists in the font?
>> It looks like a conjunct which would require
>> its own glyph.
>
> Is there a way to figure out (other than creating the .tex and
> processing it with xelatex) what level of conjuncts are supported by
> the font I'm using (Devanagari MT). Also, would you know if there are
> other fonts which support a wider variety of glyphs, conjuncts etc.
> for the Mac?
>
> Thanks
>
Just test with a number of other fonts and see if you get
the conjunct in them. As far as I'm aware any TTF/OTF
font should work on the Mac (I'm on Ubuntu). A good place to
start would be
<http://www.wazu.jp/gallery/Fonts_Devanagari.html>
Chandas while not being the most beautiful font produces the
desired conjunct without a glitch!
As someone else said XeTeX lets you get any glyph in a font
with a \XeTeXglyph command.
The trouble is to find out what glyph exist and what glyph index
number they have. This script is helpful:
%!TEX TS-program = xetex
%!TEX encoding = UTF-8 Unicode
% glyphlist.tex -- to find glyphs and their index
\font\test="Chandas" at 14pt
\newcount\charcount \charcount0
\raggedright
\loop\number\charcount
\hbox{\test\XeTeXglyph\charcount} % \hfill\break % Uncomment for
more easily scanned list!
\ifnum\charcount<4450 \advance\charcount1 \repeat
% First set this number to something very high and
% run the file with xetex. You will get an error
%
% ** ERROR ** Invalid glyph index (gid <number>)
%
% If you don't get this error message there are more
% glyphs in the font than your trial number; increase
% the number and try again!
%
% Now set the number to the number in the error
% message -1 and xetex it again. You will get a
% compact list of all glyphs in the font.
\bye
You can just hope that the glyphs in a font come in some
logical order, since the list can be hard to scan.
For example I couldn't find the ;nkhy glyph in Chandas
although I evidently could evoke it with ङ्ख्य in XeLaTeX!
Once you find a glyph something like \def\ipaB{\XeTeXglyph2886}
(To get the IPA-style beta in Junicode) is helpful.
/BP 8^)>
--
Benct Philip Jonsson -- melroch atte melroch dotte se
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"C'est en vain que nos Josués littéraires crient
à la langue de s'arrêter; les langues ni le soleil
ne s'arrêtent plus. Le jour où elles se *fixent*,
c'est qu'elles meurent." (Victor Hugo)
More information about the XeTeX
mailing list