13

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.

example-input

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}

example-output-xelatex

example-output-lualatex

fontforge-presence of ligatures

Update: I've changed Language=Sinhala to Script=Sinhala and the output from lualatex is equal to the one from xelatex.

2
  • 1
    You can look through the substitution tables in the font to figure out if the ligatures you are missing are set up at all and, if so, which feature/script/etc. enables them. If not, you will have to access them using a workaround unless you are entitled to edit the font.
    – cfr
    May 5, 2014 at 23:17
  • 1
    As far as I can see, the මන “ligature” is not present in the 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. May 28, 2014 at 19:04

1 Answer 1

4

You can use the style file created by Anurudha. He called it sinhala.sty. (In my code I renamed it sinhala1.) I used the remove thin space command to get two letters close together. I assume that there are ways to get two letters close together as precisely as you want. But, I have not found them yet. Below is my code and the output. (I used the Real Time Unicode Converter to get the sinhala words.)

\documentclass\[12pt\]{article}
\usepackage{mathtools}
\usepackage{sinhala1}

\begin{document}
\begin{flushleft}
නිම\!න ස\!ථාන
\end{flushleft}
\end{document}

Edit: I followed the advice given in a comment to replace the remove thin space command with a better command of \kern to create the "bandi akuru" (biniding letters).

\documentclass\[12pt\]{article}
\usepackage{sinhala1}

\begin{document}
\begin{flushleft}
 නිම\kern-.17emන ස\kern-.13emථාන
\end{flushleft}
\end{document}

enter image description here

3
  • The more precise way for your solution would be \kern-...em. Would you give us a bigger screen-shot? Just because it looks so nice.
    – LaRiFaRi
    Nov 6, 2014 at 16:00
  • Anyway, I do not think that this is an answer here. The OP is searching for an automatic way to get real ligatures. This is more a cheat...
    – LaRiFaRi
    Nov 6, 2014 at 16:06
  • @LaRiFaRi: I do not think that the OP is requesting any automation. As far as I know there are no rules for "bandi akuru". Therefore, I do not see how you can automate "it". On the other hand, I am not a linguist. Therefore, my knowledge is probably very limited. However, I made the image little bigger as requested for your viewing pleasure. IMHO, this is an answer. If not, then at least I learned how to type "bandi akuru".
    – Sony
    Nov 6, 2014 at 22:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .