ApplyDevanagariReorder

Signature

function ApplyDevanagariReorder(const Wide: UnicodeString): UnicodeString;

Purpose

Applies the Devanagari reorder pre-pass to Wide and returns a UnicodeString prepared for cmap and GSUB consumption. Text outside Devanagari remains byte-stable, so callers can route mixed text without changing unrelated runs

Coverage

  • Devanagari uses the deva script record for U+0900-U+097F. The documented path covers R1-R5 with conjunct preservation while preserving API behaviour for producer-side shaping
  • ApplyIndicReorder dispatches to this helper when the active codepoint range matches U+0900-U+097F

Example

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;

See also

Standards

  • Unicode 16.0 U+0900-U+097F
  • ISO 32000-1 ยง9.10
  • OpenType Devanagari shaping specification

Version history

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