PDFiumVCL Docs

FontItalicAngle property

Dieser API-Eintrag behält Bezeichner, Signaturen, Codeblöcke und PDF-Begriffe in ihrer Originalform.
Component: TPdf  ·  Unit: PDFium
Read-only indexed access to the italic angle of the font in degrees (negative for typical italic; 0 for upright).

Syntax

property FontItalicAngle[FontIndex: Integer]: Single; // read only

Description

Returns the italic angle of the font in degrees (negative for typical italic; 0 for upright). The property is indexed by a font handle obtained from a character (FontHandle[CharIndex]) or directly enumerated through the page's font resources.

Read-only. The underlying value is queried lazily by PDFium from the font dictionary or font program. When the index does not match a known font, the function raises EPdfError.

Use this property together with CharacterFontSize / CharacterFontWeight to drive font-substitution or text-style reconstruction pipelines.

Parameters

FontIndexIndex of the font handle. Obtain via FontHandle[CharIndex] or by enumerating the page font resources.

Remarks

Example

var

  FontIdx: Integer;

begin

  // inspect the font used by the first character

  if Pdf1.CharacterCount > 0 then

  begin

    FontIdx := Pdf1.FontHandle[0];

    Memo1.Lines.Add(Format('%s (embed=%s)',

      [Pdf1.FontFamilyName[FontIdx], BoolToStr(Pdf1.FontIsEmbedded[FontIdx], True)]));

  end;

end;

See Also

FontSize, FontWeight, FontFamilyName, FontIsEmbedded, CharacterFontSize