PDFium Delphi Component Docs

CharacterFontWeight プロパティ

コンポーネント: TPdf  ·  ユニット: PDFium
使用されている font の OS/2 usWeightClass 値を返す read-only indexed access です (100 = Thin、400 = Regular、700 = Bold、900 = Black)

構文

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)

備考

例

var

  I: Integer;

begin

  for I := 0 to Pdf1.CharacterCount - 1 do

    if Pdf1.CharacterFontWeight[I] >= 700 then ShowMessage('bold');

end;

関連項目

CharacterCount, Charcode, CharacterRectangle, Character, TextPage