Manjari is a traditional orthography font for Malayalam. It has large set of ligatures, vowel signs like /u/ get attached to its corresponding consonants to form ligatures. But, sometimes there are requirements to illustrate new orthography Malayalam content in Manjari. Recently, Manjari was used to typeset an academic book related to Malayalam script and it was required to show some content in new orthography with detached vowel signs and detached reph signs. Using a different font that follows new orthography such as Noto Sans Malayalam was possible, but mixing Noto and Manjari won’t give a pleasant reading experience.
In this article, I will explain how Manjari font can be used for this kind of usecases. First in web pages and then in TeX.
The basic principle is to control which opentype features are enabled or disabled for rendering. Manjari’s opentype implementation is modular and it allows enabling or disabling specific features. This procedure will work with all the fonts SMC released. But it won’t work with fonts released by RIT as they follow an approach where every ligature in the font is by akhand
feature.
- For detaching all vowel signs from its consonants(കു, പു, സൃ, തൃ) as in new lipi/new orthography, we disable the Post base substitution -
psts
feature. - To disable reph ligatures(ക്ര, പ്ര etc) we disable Prebase substitution -
pres
Note that we keep stacked or horizontally formed conjuncts as such. Their behavior is not clearly distinguisable in old and new orthographies. For example, stacked സ്സ, horizontal ligature ന്ന is present in both orthography.
Using CSS to control orthography
CSS allows controlling opentype features by using font-feature-settings
. To get new orthography, we use the style
font-feature-settings: "psts" off, "pres" off;
Following image shows the effect of having this style.
XeTeX and opentype feature selection
The fontspec package exposes RawFeature
option to control low level opentype features. RawFeature=-pres;-psts
disables psts
and pres
To define Manjari as new lipi font, the following snippet might help.
\newfontfamily\malnewliipifont[Script=Malayalam, HyphenChar="00AD]{Manjari}[
Path=fonts/,
UprightFont=Manjari-Regular.ttf,
RawFeature=-pres;-psts
]
Then, use it like \malnewliipifont{ your content }
Important: As I mentioned in the beginning, Manjari is designed as old orthography font and it is highly recommended to use it as such.