property CharacterFontWeight[Index: Integer]: Integer; // read only
使用されている font の OS/2 usWeightClass 値(100 = Thin、400 = Regular、700 = Bold、900 = Black)へのインデックス付き read-only アクセスです。現在のページでは 0 .. CharacterCount - 1 が有効範囲で、範囲外のインデックスは EPdfError を発生させます
文字は論理的な読み順(PDFium が content stream を解析した順)で返されます。視覚順とは限らず、右から左に書く言語では逆順に見えることがあります
| Index | 現在のページでの 0 基準の文字インデックス(0 .. CharacterCount - 1) |
Active が False のとき、またはページが開かれていないとき、CharacterCount は 0 に戻りますCharacterGenerated を参照)
var
I: Integer;
begin
for I := 0 to Pdf1.CharacterCount - 1 do
if Pdf1.CharacterFontWeight[I] >= 700 then ShowMessage('bold');
end;