[XeTeX] Trouble with displaying word containing 3 conjunct consonants in Devanagari

Guido Herzog guido_herzog at hotmail.com
Thu Sep 24 16:19:44 CEST 2009


Test  the following code

%!TEX TS-program =  xetex
%!TEX encoding   =  UTF-8 Unicode

% glyphlist.tex -- to find glyphs and their index

\parindent 0pt

 \font\test="Chandas"    at 14pt
%\font\test="Charis SIL" at 14pt

\newcount\charcountA \charcountA 0

\newcount\charcountB \charcountB \XeTeXcountglyphs\test \advance\charcountB -1
\newcount\charcountC \charcountC 0

\def\ystrut {\vrule height 15.0pt depth 5.5pt width 0pt}

\advance\vsize 4\baselineskip

\loop
 \advance\charcountC 1
 \leavevmode
 \hbox{\hbox to 10mm{\hss\number\charcountA\quad}%
       \hbox to 10mm{\test\XeTeXglyph\charcountA\ystrut\hss}%
      }%
 \ifnum\charcountC = 8 \endgraf          \charcountC 0 \fi
 \ifnum\charcountA < \charcountB \advance\charcountA 1
\repeat

\bye

> Date: Mon, 21 Sep 2009 15:22:41 +0200
> From: bpj at melroch.se
> To: xetex at tug.org
> Subject: Re: [XeTeX] Trouble with displaying word containing 3 conjunct	consonants in Devanagari
> 
> 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)
> 
 		 	   		  
_________________________________________________________________
http://redirect.gimas.net/?n=M0906xWLM2009
Neu: Messenger 2009! Hier kostenlos downloaden!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/xetex/attachments/20090924/3e379bf3/attachment.html>


More information about the XeTeX mailing list