ApplyBengaliReorder

シグネチャ

function ApplyBengaliReorder(const Wide: UnicodeString): UnicodeString;

目的

Wide に Bengali の並べ替え前処理を適用し、cmap と GSUB に渡せる UnicodeString を返します。Bengali 以外のテキストはバイト単位で安定したままです

対応範囲

  • R1 Repha: 音節が Ra (U+09B0) + Halant (U+09CD) + Consonant で始まる場合、(Ra, Halant) のペアを音節末尾へ移動します
  • R2 前置 matra: U+09BF(I)、U+09C7(E)、U+09C8(AI)を音節の先頭へ移動します。ベンガル文字の E/AI は前置で、上付き基底のデーヴァナガリーとは異なる点に注意してください
  • R3 上付き基底 matra:(ベンガル文字では空 — 主ブロックに上付き基底 matra はありません)
  • R4 下付き基底 matra: U+09C1–U+09C4(U/UU/Vocalic R/RR)、U+09E2–U+09E3(Vocalic L/LL)を基底ブロックの後に出力
  • R5 後置 matra: U+09BE(AA)、U+09C0(II)、U+09D7(AU 長音符)を下付き基底の後に出力
  • 分割 matra: U+09CB(Oo)は U+09C7(前置)+ U+09BE(後置)へ、U+09CC(AU)は U+09C7(前置)+ U+09D7(後置)へ分解します

音節ごとの出力レイアウト: [pre-matras] + [base + halant + nukta + bindu/visarga/modifier] + [below-matras] + [post-matras] + [Repha: Ra Halant]?

連結形(C + Halant + C)は基底ブロックに保持されます。シングルパスで冪等

例

var
  Wide: UnicodeString;
begin
  // Input: KA + Oo-matra (single codepoint U+09CB)
  Wide:= Doc.ApplyBengaliReorder(#$0995#$09CB);
  // Wide is now: U+09C7 + KA + U+09BE  (Oo decomposed to pre+post)
end;

関連 API

  • ApplyIndicReorder — total dispatcher covering all registered Indic scripts.
  • ApplyDevanagariReorder — Devanagari single-script counterpart.
  • GetBengaliCategory — Unicode codepoint → category lookup.

標準

  • Unicode 16.0 §12.2 (Bengali)
  • Unicode 16.0 IndicSyllabicCategory.txt、IndicPositionalCategory.txt
  • ISO 32000-1 §9.10(テキストコンテンツの抽出)
  • OpenType Bengali shaping spec

バージョン履歴

  • v2.119.71 - HotPDF の Indic shaping バッチの一部として追加されました