ApplyGujaratiReorder

Signature

function ApplyGujaratiReorder(const Wide: UnicodeString): UnicodeString;

Purpose

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

Coverage

  • Gujarati uses the gujr script record for U+0A80-U+0AFF. The documented path covers R1-R5 with no split matras while preserving API behaviour for producer-side shaping
  • ApplyIndicReorder dispatches to this helper when the active codepoint range matches U+0A80-U+0AFF

Example

var
  Wide: UnicodeString;
begin
  // Input: KA + AA(post) + U(below) + E(above) + I(pre)
  Wide:= Doc.ApplyGujaratiReorder(#$0A95#$0ABE#$0AC1#$0AC7#$0ABF);
  // Wide is now: I + KA + E + U + AA  (canonical 5-buffer order)
end;

See also

Standards

  • Unicode 16.0 U+0A80-U+0AFF
  • ISO 32000-1 ยง9.10
  • OpenType Gujarati shaping specification

Version history

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