Legacy Sinhala fonts
Before Sinhala Unicode support was common, Sri Lankan publishers, newspapers and offices typed Sinhala with ASCII-keyed fonts. FM Abhaya, from the FM series of fonts, is one of the best known. Text from it looks like English letters with odd punctuation until the font is applied; a sentence in the sample table below is stored as characters such as isxy, and mdi,. Unicode Sinhala (U+0D80 to U+0DFF) is what Iskoola Pota, Nirmala UI, Android and iOS expect.
The tables behind this page come from two open-source projects released under the MIT licence: the Pandukabhaya FM Abhaya mapping (legacy to Unicode) and the sinhala-legacy-converter dataset (Unicode to legacy). We tested the legacy to Unicode direction against the six real-world sentences in the Pandukabhaya test suite and it reproduces all six exactly.
Sinhala-specific features
- Prefix vowel signs. The signs ෙ ේ ො ෝ ෛ are typed before the consonant in FM fonts but follow it in Unicode. The tables carry the correct order for every consonant, so කෝ is stored as
flda. - Rakaransaya and yansaya. Conjuncts such as ශ්රී and ක්ර use a zero-width joiner in Unicode and a dedicated glyph in FM Abhaya. Keep the joiner when you paste Unicode text, or the conjunct can fall apart.
- Al-lakuna. The vowel-killer sign (්) must attach to the right consonant; check word endings such as ආයුබෝවන්.
- Alternative codes. Some FM-encoded files use more than one code for the same sign (for example the order of a vowel sign and a following mark). Conversion to Unicode normalises them; going back to FM may therefore produce a different but equivalent spelling.
Real conversions from this tool
These pairs were produced by this page's converter. The middle column shows what a legacy-font file really stores; the last confirms that converting it back returns the original text.
| Unicode text | Legacy font characters (what the file stores) | Converts back |
|---|---|---|
| සිංහල භාෂාව | isxy, NdIdj | ✓ |
| ශ්රී ලංකා | › ,xld | ✓ |
| ආයුබෝවන් | wdhqfndajka | ✓ |
| පාසල | mdi, | ✓ |
Steps
- Paste FM Abhaya text on the left (copied from the original document).
- Check the Sinhala Unicode on the right; spot-check names and conjuncts.
- Copy into a document or website. To produce FM Abhaya, press Swap Direction and paste Unicode. For direct typing, see the Sinhala online keyboard.
Sinhala documents and publishing
Sri Lankan publishers and offices produced many documents in FM Abhaya and similar fonts. When you recover an old file, convert a short passage first and compare it with the printed page, particularly where a word contains a conjunct or a prefix vowel sign. Use lang="si" on web pages and a font such as Noto Sans Sinhala or Iskoola Pota. Keep zero-width joiners in any Unicode you paste, and store the Unicode version as your master copy.
Troubleshooting FM Abhaya conversions
FM Abhaya and the other FM fonts were the standard for Sri Lankan Sinhala newspapers, school papers and printing. The key differences from Unicode are in vowel signs and conjunct marks.
| What you see | Likely cause | What to do |
|---|---|---|
| කෙ or කො appears as a sign floating before the letter | In FM fonts the kombuva (ෙ) is typed before the consonant | Unicode stores it after; check the displayed result in a Unicode font |
| ශ්රී shows as ශ්රී with a visible hal sign | Rakaransaya and yansaya need an invisible zero-width joiner in Unicode | Retype the conjunct, or copy ශ්රී from correctly converted text |
| Mahaprana letters (ඛ, ඝ, ඨ) became the plain letter | These are on shifted keys and were sometimes mistyped | Proofread names and formal vocabulary |
| Some words remain in Latin letters | The document used another FM font or an English font for those words | Check the font in the source and convert separately |
| Unicode output shows boxes | No Sinhala Unicode font is installed | Use Iskoola Pota, Nirmala UI or Noto Sans Sinhala |
Sinhala on the web
Unicode Sinhala is needed for government websites, social media and search. After converting, check the conjuncts in the final font, because different fonts handle the zero-width joiner slightly differently. Keep the FM original only if a print layout depends on it.
Accuracy note
The common letters, vowel signs and conjuncts on this page were checked against known real-world text typed in the genuine font, and the examples above round-trip exactly. Legacy encodings reuse punctuation keys for letters, so a few characters (for example the semicolon and colon in Kruti-style fonts) can change meaning when mixed text is converted; proofread punctuation after converting.
Key terms
- Al-lakuna
- The Sinhala vowel-killer sign (්) that removes a consonant's inherent vowel.
- Rakaransaya
- The conjunct form of ර used with a preceding consonant.
- Iskoola Pota
- A common Sinhala Unicode font bundled with Windows.