If you have ever generated certificates and found that محمد came out as separate letters, or that a Malayalam name like ശ്രീലക്ഷ്മി lost its conjuncts and showed loose signs, you have met a text shaping problem. It is common in certificate tools, PDF libraries and older software. Here is what is going on.

Letters are not glyphs

In English, each letter usually maps to one shape. In Arabic and in Indian scripts it does not.

Arabic letters change shape depending on their position in a word: isolated, initial, middle or final. The letter ه has four quite different forms. Letters also join with their neighbours, and some pairs combine into special ligatures, like لا. The text is stored as the basic letters; software has to choose the right form for each position.

Malayalam, like Hindi, Tamil and other Indic scripts, combines consonants into conjuncts. The name ശ്രീലക്ഷ്മി is stored as a sequence including ശ, ്, ര, ീ, ല, ക, ്, ഷ, ്, മ, ി. A correct renderer turns ക്ഷ into a single conjunct shape and places vowel signs in the right position, sometimes before the consonant they follow in memory.

Choosing and positioning these shapes is called text shaping. Web browsers, modern word processors and design tools do it with engines like HarfBuzz. Many simple PDF libraries do not. They place one shape per character, left to right, which produces disconnected Arabic written in the wrong direction and broken Indic conjuncts.

The old Malayalam font problem

There is a second issue specific to Malayalam. Before Unicode was widely supported, Malayalam publishing used ASCII-based fonts, such as the ML-TT family, where English letters were drawn as Malayalam shapes. Text typed in those fonts looks right only in that exact font, and is just Latin letters to everything else. If your spreadsheet came from an old DTP file, the names may be in this format. They need converting to Unicode before any modern tool can use them.

How to get names right

  1. Use Unicode text. Type names with a standard Malayalam or Arabic keyboard on your phone or computer, or use Google Input Tools. If the text looks like random English letters when you change the font, it is ASCII-font text and needs converting.
  2. Use a font that covers the script. A font without Malayalam glyphs shows boxes. Noto Sans Malayalam, Noto Naskh Arabic and Noto Sans Devanagari are free, high-quality and cover everything.
  3. Use a tool that shapes text. Our certificate generator draws text with the browser’s own shaping engine, the same one that displays these scripts correctly on web pages, then places the result in the PDF as a high-resolution image. Names look exactly as they do on screen.
  4. Check right-to-left alignment. For an Arabic name in a centred field, centring works as expected. For left- or right-aligned fields, remember that Arabic reads from the right.

Mixed lists

A list with English, Arabic and Malayalam names together is normal in schools and companies in the Gulf and Kerala. The certificate tool picks a suitable font for each script automatically when you use the included Noto fonts, so one template works for the whole list. Preview a few rows in each script before downloading the full batch.

For the full process of making certificates from a spreadsheet, see how to make certificates in bulk from Excel.

Sources