[OS X TeX] Malayalam with xelatex

NMPOST7 nmpost7 at gmail.com
Tue Nov 12 21:28:07 EST 2013


On 13/11/2013 02:12, Herbert Schulz wrote:
> I don't have your font(s) but there is a Malayalam font supplied in OS X. Here is something that seems to work:
> 
> %%!TEX TS-program = xelatex
> %%!TEX encoding = UTF-8 Unicode
> \documentclass{article}
> \usepackage{fontspec}
> \usepackage{polyglossia}
> \setdefaultlanguage{malayalam}
> \newfontfamily\malayalamfont[Script=Malayalam,Ligatures=TeX,HyphenChar="00]{Malayalam Sangam MN}
> \begin{document}
> മലയാളഭാഷ. ൽ ൾ ർ  ക്ക ങ്ക കൃ   1,2,3    
> \end{document}

Thanks Herb. The rendering is fine with the letters and digits. But the
ligatures (the fourth character) gets split into two (the new script), which
looks hideous and also difficult to read.
Another problem in the file I sent you was the full stop. The point get rendered
as a box. However I found a work around. It is not an elegant solution but
works. The reason why I use the font Rachana is that it is aesthetic. and uses
the old script, which is easier to read.

(available on:  http://www.prokerala.com/downloads/fonts.php )

The only modification is in the preamble (line 5).
In the main code the markup \textenglish{1,2,3.} renderes the numbers, the
commas and the full stop correctly. I think I need to stick to that option until
a better solution appears. Probably write a mini macro for that.


\documentclass{article}
\usepackage{fontspec}
\usepackage{polyglossia,xltxtra}
\setdefaultlanguage{malayalam}
\setotherlanguage{english}
\newfontfamily\malayalamfont[Script=Malayalam,Ligatures=TeX,HyphenChar="00]{Rachana}
\begin{document}
മലയാളഭാഷ. ൽ ൾ ർ  ക്ക     1,2,3     \textenglish{1,2,3.}
\end{document}


BR
suren

(PS: I am not sure if I need to use xlxtra package (as far as I know the
fontspec package calls this.I shall try omitting it)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xelatexmal01.pdf
Type: application/pdf
Size: 10474 bytes
Desc: not available
URL: <https://email.esm.psu.edu/pipermail/macosx-tex/attachments/20131113/6951bc56/attachment.pdf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xelatexmal01.tex
Type: application/x-tex
Size: 703 bytes
Desc: not available
URL: <https://email.esm.psu.edu/pipermail/macosx-tex/attachments/20131113/6951bc56/attachment.tex>


More information about the MacOSX-TeX mailing list