ApplyGujaratiReorder
シグネチャ
function ApplyGujaratiReorder(const Wide: UnicodeString): UnicodeString;
目的
Wide に Gujarati の並べ替え前処理を適用し、cmap と GSUB に渡せる UnicodeString を返します。Gujarati 以外のテキストはバイト単位で安定したままです
対応範囲
- R1 Repha:
Ra (U+0AB0) + Halant (U+0ACD) + Consonant→ (Ra, Halant) を音節末尾へ移動 - R2 前置 matra:
U+0ABF(I)を音節の先頭へ移動 - R3 上付き基底 matra:
U+0AC5(CANDRA E)、U+0AC7(E)、U+0AC8(AI)を基底ブロックの後に出力します。グジャラート文字の E/AI は(デーヴァナガリーと同様に)上付き基底で、前置のベンガル文字とは異なる点に注意してください - R4 下付き基底 matra:
U+0AC1–U+0AC4(U/UU/Vocalic R/RR)、U+0AE2–U+0AE3(Vocalic L/LL)を上付き基底の後に出力 - R5 後置 matra:
U+0ABE(AA)、U+0AC0(II)、U+0AC9(CANDRA O)、U+0ACB–U+0ACC(O/AU)を下付き基底の後に出力 - グジャラート文字の主ブロックに分割 matra はありません
音節ごとの出力レイアウト: [pre-matras] + [base + halant + nukta + bindu/visarga/modifier] + [above-matras] + [below-matras] + [post-matras] + [Repha: Ra Halant]?
連結形(C + Halant + C)は基底ブロックに保持されます。シングルパスで冪等
例
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;
関連 API
ApplyIndicReorder— total dispatcher.ApplyDevanagariReorder— Devanagari counterpart.ApplyBengaliReorder— Bengali counterpart.GetGujaratiCategory— Unicode codepoint → category lookup.
標準
- Unicode 16.0 §12.6 (Gujarati)
- Unicode 16.0
IndicSyllabicCategory.txt、IndicPositionalCategory.txt - ISO 32000-1 §9.10(テキストコンテンツの抽出)
- OpenType Gujarati shaping spec
バージョン履歴
- v2.119.72 - HotPDF の Indic shaping バッチの一部として追加されました