GetSinhalaCategory

Signature

function GetSinhalaCategory(CP: Cardinal): Integer;

Purpose

Returns the HotPDF syllabic category used by the Sinhala reorder pre-pass. The function is a codepoint lookup, needs no font state, and returns category 0 for values outside the Sinhala rangeGetDevanagariCategory)

Return values

CodeCategoryExample codepoints
0Otherfallback or outside range
1ConsonantSinhala consonants
2Independent vowelSinhala vowel letters
3MatraSinhala dependent vowel signs
4Viramahalant or virama
5Nuktanukta mark where the script uses one
6Binduchandrabindu or anusvara
7Visargavisarga sign
9DigitSinhala digits
11ZWNJU+200C

Notes

  • Three pre-base matras (MatraPos = 1 and by the full Indic dispatcherU+0DD9), EE (U+0DDA), AI (U+0DDB). Sinhala has more pre-base matras than any other Phase 8f Brahmic script.
  • Above-base matras (MatraPos = 3): I (U+0DD2), II (U+0DD3).
  • Below-base matras (MatraPos = 4): U (U+0DD4), UU (U+0DD6).
  • Post-base matras (MatraPos = 2): AA (U+0DCF), AE (U+0DD0), AAE (U+0DD1), Vocalic R matra (U+0DD8), L matra (U+0DDF), LL / LLL matras (U+0DF2–U+0DF3).
  • Split matras (MatraPos = 5): O (U+0DDC), OO (U+0DDD), AU (U+0DDE). All three decomposed per Unicode 16.0 canonical decomposition by ApplySinhalaReorder; U+0DDD OO is a three-part split (pre + post + post).
  • Halant is U+0DCA (named AL-LAKUNA in Sinhala).
  • Two bindu codepoints (combining anusvara and anusvara) at U+0D81–U+0D82; visarga at U+0D83.

See also

Version history

  • v2.119.77 - Introduced as part of the HotPDF Indic shaping batch