Malayalam fonts: Beyond Latin font metrics

This year’s annual international conference organized by TeX Users Group — TUG2020 — was held completely online due to the raging pandemic. In TUG2020, I have presented a talk on some important Malayalam typeface design factors and considerations.

The idea and its articulation of the talk originated with K.H. Hussain, designer of well-known fonts such as Rachana, Meera, Meera Inimai, TNJoy etc. In a number of discussions that ensued, this idea was developed and later presented at TUG2020.

Opening keynote to TUG2020 was delivered by Steve Matteson, about the design of Noto fonts. He mentioned that Noto was originally envisaged to be developed as a single font containing all Unicode scripts; but that was changed due to a couple of reasons: (1) huge size of resulting font and (2) the design of many South/South-East Asian characters do not fit well within its Latin font metrics.

This second point set up the stage nicely for my talk, in which we argued that a paradigm shift from established Latin font metrics is necessary in designing and choosing font metrics for Indic scripts, in particular with Malayalam as a case study.

Indic scripts have abundant conjunct characters (basic characters combined to form a distinct shape). The same characters may join ‘horizontally’ (e.g. ത്സ/thsa) or ‘vertically/stacked’ (e.g. സ്ത/stha); and Malayalam script in particular has plenty of stacked conjuncts even in contrast with other Indic scripts. This peculiarity also makes the glyph design of fonts challenging — to balance aesthetics, legibility/readability and leading/line spacing. Specifically, following the usual x-height/cap-height/ascender/descender metrics used in Latin fonts put a lot of constraints in the design of stacked conjuncts. We propose to break away from this conventional metrics and adopt different proportions of the above- and below-base glyphs (even if they are the same characters, e.g. സ in the double conjunct സ്സ), still conforming to the aesthetics of the script yet managing the legibility and leading.

Fig. 1: Malayalam stacked conjuncts beyond conventional Latin font metrics.

Details of this study, argument and proposal can be found in the slides of the presentation available at the program details as well as the recorded talk now available on TUG YouTube channel.

TUG2020 presentation.

The conference paper, edited by Barbara Beeton and Karl Berry will be published in the next issue of TUGBoat journal.

Update Dec 2020: The conference paper is openly accessible at TUGBoat website.

Complex text shaping fixed in Konsole 20.08

Konsole was one of the few terminal emulators with proper complex text shaping support. Unfortunately, complex text (including Malayalam) shaping was broken around KDE Applications release 18.08 (see upstream bug 401094 for details).

Broken Malayalam text shaping in Konsole 20.04

Mariusz Glebocki fixed the code in January this year which I tested to work correctly. There’s a minor issue of glyphs with deep vertical components being cut-off (notice rendering of “സ്കൂ”), but otherwise the shaping and rendering is good. The patches are also merged upstream and will be part of the KDE Applications Bundle 20.08.

Proper Malayalam text shaping in Konsole 20.04 with shaping fixes.

If you don’t want to wait that long, I have made a 20.04 release with the fixes on top available for Fedora 31 & 32 in this COPR.

Meera font updated to fix issue with InDesign

I have worked to make sure that fonts maintained at SMC work with mlym (Pango/Qt4/Windows XP era) opentype specification as well as mlm2 (Harfbuzz/Windows Vista+ era) specification, in the same font. These have also been tested in the past (2016ish) with Adobe softwares which use their own shaping engine (they use neither Harfbuzz nor Uniscribe; but there are plans to use Harfbuzz in the future — the internet tells me).

Some time ago, I received reports that typesetting articles in Adobe InDesign using Meera font has some serious issues with Chandrakkala/Halant positioning in combination with conjuncts.

When the Savmruthokaram/Chandrakkala ് (U+0D4D) follows a consonant or conjunct, it should be placed at the ‘right shoulder’ of the consonant/conjunct. But in InDesgin (CC 2019), it appears incorrectly on the ‘left shoulder’. This incorrect rendering is highlighted in figure below.

Wrong chandrakkala position before consonant in InDesign.

The correct rendering should have Chandrakkala appearing at the right of as in figure below.

Correct chandrakkala position after consonant.

This issue manifested only in Meera, but not in other fonts like Rachana or Uroob. Digging deeper, I found that only Meera has Mark-to-Base positioning GPOS lookup rule for Chandrakkala. This was done (instead of adjusting leftt bearing of the Chandrakkala glyph) to appear correctly on the ‘right shoulder’ of consonant. Unfortunately, InDesign seems to get this wrong.

To verify, shaping involving the Dot Reph ൎ (U+0D4E) (which is also opentype engineered as Mark-to-Base GPOS lookup) is checked. And sure enough, InDesign gets it wrong as well.

Dot Reph position (InDesign on left, Harfbuzz/Uniscribe on right)

The issue has been worked around by removing the GPOS lookup rules for Chandrakkala and tested with Harfbuzz, Uniscribe and InDesign. I have tagged a new version 7.0.2 of Meera and it is available for download from SMC website. As this issue has affected many users of InDesign, hopefully this update brings much joy to them to use Meera again. Windows/InDesign users make sure that previous versions of the font are uninstalled before installing this version.