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
| Code | Category | Example codepoints |
|---|---|---|
| 0 | Other | fallback or outside range |
| 1 | Consonant | Sinhala consonants |
| 2 | Independent vowel | Sinhala vowel letters |
| 3 | Matra | Sinhala dependent vowel signs |
| 4 | Virama | halant or virama |
| 5 | Nukta | nukta mark where the script uses one |
| 6 | Bindu | chandrabindu or anusvara |
| 7 | Visarga | visarga sign |
| 9 | Digit | Sinhala digits |
| 11 | ZWNJ | U+200C |
Notes
- Three pre-base matras (
MatraPos = 1and 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 byApplySinhalaReorder;U+0DDDOO 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 atU+0D83.
See also
ApplySinhalaReorderApplyIndicReorderGetDevanagariCategoryGetBengaliCategoryGetGujaratiCategoryGetTamilCategoryGetTeluguCategoryGetKannadaCategory- Sinhala reorder pre-passApplyIndicReorder- Indic dispatcher
Version history
- v2.119.77 - Introduced as part of the HotPDF Indic shaping batch