I am trying to reproduce a term from an old Siṇhala-English dictionary. I have checked several fonts and the best candidates for the job seemed coming from the Bhashitha font family. The font contains some ligatures. The question is how to get them automatically?
I've tried to typeset nimnasthaana with the help of Lexilogos. The term is mentioned on page 289 in the book (it's page 597 of 1676 in the PDF file), the ligatures are the second and the third letter. I am getting line one in the example below.
I know that the first consonant in consonant conjuncts is without virama, therefore instead of nimnasthaana I used nimanasathaana (m -> ma and s -> sa). I am getting the second line and I am closer to the wanted visual form, but I am pretty far from getting those two ligatures.
I cannot copy glyphs directly from the PDF file, we would get ^Saaeoftos?, it is a result of OCR containing only Latin letters.
If we run:
otfinfo -s BhashitaComplex.ttf
we are getting this information:
sinh Sinhala
sinh.zz01 Sinhala/<unknown language>
I've tried several way to turn on zz01 (as a language, script, feature, rawfeature), but it didn't help me much with getting ligatures.
My problem seems to be more general. It is likely that some old ligatures are not present in the font, so I tried to get mra (ම්ර). When I tried m+ra
or ma+ra
, I am getting two separate glyphs. If I copy the final glyph from Lexilogos, the typesetted result is all right. Also, if I use \char"E168
, the glyph is there as well.
It's likely there is a better font and/or way for this task, the Bhashitha font family is the Level 3 font, it's probably the best font we could get these days. Still, my next step would be to check fonts from http://www.kaputa.com/sinhalaunicode/sinhalafonts/, but it's hard to say if I can improve my current state.
Edit: I've checked those fonts manually and it looks none of them is the Level 3 font. The biggest file in size is [Thara](http://www.kaputa.com/sinhalaunicode/sinhalafonts/fonts/THARA.zip; 930 KB), but even that font contains only a basic set of glyphs.
I am enclosing an example and a preview of my efforts. The first preview is from xelatex
, the second picture is a result without compositions/ligatures after running lualatex
. My last screenshot is a proof that some old ligatures are present in the font.
% run: xelatex or lualatex mal-sinhala.tex
\documentclass[a4paper]{article}
\pagestyle{empty}
%\usepackage{xltxtra}
%\usepackage{luatextra}
\usepackage{fontspec}
\setmainfont[Language=Sinhala]{BhashitaComplex.ttf}
% BhashitaComplex.ttf
% iskpota.ttf
\parindent=0pt
\begin{document}
නිම්නස්ථාන (nimnasthaana) \par
නිමනසථාන (nimanasathaana) \par
ම්ර-මර-ම්ර-\char"E168\ (mra-mara-mra/correct)
\end{document}
Update: I've changed Language=Sinhala
to Script=Sinhala
and the output from lualatex
is equal to the one from xelatex
.
BhashitaComplex
font. As you have already discovered, there are some combined glyphs defined in the Private Use Area, but as @cfr pointed out, they are (probably) not set up (correctly), see this image (මම vs. PUA glyph U+E281). I could not get the second result by just entering මම. Furthermore, most (if not all) of these “ligatures” seem like narrowly kerned pairs of the letters and not new, combined forms. This is the font’s problem. You might look for a new font or use\kern
.