Wednesday, May 28, 2014

Interesting dilemma of Devanagari script fonts

I am sure after reading this post all font developers of well know Devanagari script fonts will start looking at there fonts again and start thinking there font is for which language?

Either they have developed font for Devanagari script or is it font for some specific language or it is simply a mess ?

As most of you know Devanagari script is widely used for number of languages. Major languages in this list are Hindi, Marathi, Nepali, Konkani, Sanskrit, Maithili, Kashmiri and Sindhi and some more languages.

Each language has some specific requirements from Devanagari script as follows.

    Characters requirement from Devanagari script block:
        Kashmiri, Marathi, Sindhi and Sanskrit has specific characters defined in Unicode Devanagari code page[1]. This is bit easy to identify, since Unicode has mentioned  it clearly for codepoints.

    Ligatures/Conjuncts requirement from Devanagari script:
        This one is bit tricky and one must go through each language standard documents from Governments or standardization organizations. I would like to mention some important differences here.

        1. Locale specific shapes for Unicode characters

Different shapes of same characters required in particular language.  Few examples of these are in Marathi "ल" (U+0932) and "श" (U+0936) are different than Unicode code block characters, same way Nepali language also has few different shapes for numerals. (Refer Lohit fonts for more information [2])

       2. Different behaviour of conjuncts across language. 

      This one is really painful, since there are not 3-4 but lots of conjuncts characters are different in widely used languages like Hindi and Marathi. Hindi language mostly prefers horizontal ligature (i.e. simply half form of characters) while language like Marathi, Sanskrit requires ligature form of conjunct which is used to be stacked.

After considering above points:
when you see, download or use any Devanagari font, you will definitely start thinking this font is for which language exactly?
Font for Hindi language with horizontal ligatures?
Font for Marathi language with Stacked ligature?
Pan Devanagari fonts supporting all language?
Even though its pan devanagari fonts, what it renders in en_US/en_IN locale?

       Lohit2 is one of the best example of how to handle this effectively. Still it needs some fixes for default behaviour of Lohit Devanagari font. Since Devanagari is widely used for Hindi language, i am in fever of making default behaviour of Lohit Devanagari to match with Hindi language and for other languages one should either download Lohit fonts for specific language (lohit-marathi, lohit-nepali)  or select appropriate locale while using Lohit Devanagari.

      Still question arises if default behaviour matches Hindi then, why it is called Devanagari, but i think answer is since it supporting other languages as well it is called Lohit Devanagari.

1. http://www.unicode.org/charts/PDF/U0900.pdf
2. https://github.com/pravins/lohit

No comments: