ApplyDevanagariReorder

Firma

function ApplyDevanagariReorder(const Wide: UnicodeString): UnicodeString;

Scopo

Applica il pre-pass di riordino Devanagari a Wide e restituisce un UnicodeString pronto per cmap e GSUB. Il testo fuori da Devanagari resta stabile byte per byte, quindi i chiamanti possono gestire testo misto senza cambiare segmenti non correlati

Copertura

  • R1 Repha: quando una sillaba inizia condeva, la coppia (Ra, Halant) si sposta alla fine della sillaba.
  • R2 Matra pre-base: i matra con MatraPos = 1 (ad es. U+093F matra I, U+094E PRISHTHAMATRA E) vengono spostati all'inizio della sillaba.
  • R3 Matre sopra la base: matre con MatraPos = 3 (e.g. U+0947–U+0948 E/AI, U+0945–U+0946 CANDRA E/SHORT E) emit after the base block.
  • R4 Matre sotto la base: matre con MatraPos = 4 (e.g. U+0941–U+0944 U/UU/Vocalic R/RR) emit after above-base.
  • R5 Matre dopo la base: matre con MatraPos = 2 (e.g. U+093E AA, U+0940 II, U+0949–U+094C CANDRA O/SHORT O/O/AU) emit after below-base.

Disposizione in output per sillaba: [pre-matras] + [base + halant + nukta + bindu/visarga/modifier — Repha and matras removed] + [above-matras] + [below-matras] + [post-matras] + [Repha: Ra Halant]?

Conjuncts (C + Halant + C) are preserved by keeping all non-matra content in the base block in original relative order Reorder is single-pass and idempotent

Esempio

var
  Wide: UnicodeString;
begin
  // Input: RA + HALANT + KA + I-matra
  Wide:= Doc.ApplyDevanagariReorder(#$0930#$094D#$0915#$093F);
  // Wide is now: I-matra + KA + RA + HALANT  (R1 + R2 applied)
end;

Vedere anche

Standard

  • Unicode 16.0 §12.1 (Devanagari)
  • Unicode 16.0 IndicSyllabicCategory.txt e IndicPositionalCategory.txt
  • ISO 32000-1 §9.10 (extraction of text content)
  • Specifica di shaping OpenType per il devanagari

Cronologia versioni

  • v2.119.55 — Initial Devanagari reorder pre-pass (Phase 8e Phase D); R1 Repha + R2 pre-base I-matra only.
  • v2.119.67 — Applicata automaticamente all'interno di BuildUnicode*FieldContent when sfIndicShaping is set (Phase 8e).
  • v2.119.69 — instradata internamente tramite ApplyIndicReorder dispatcher; output unchanged (Phase 8f.0).
  • v2.119.70 — Shaper completo: aggiunto il riposizionamento dei matra R3 above-base + R4 below-base + R5 post-base; il reorder ora copre tutti e 4 gli slot di MatraPos (Phase 8f.1).