Docs de PDFiumPas

FontData Propiedad

Esta entrada API conserva identificadores, firmas, bloques de código y términos PDF en su forma original.
Componente: TPdf  ·  Unidad: PDFium
Acceso indexado de solo lectura a los bytes en bruto del programa de fuente incrustado, solo se rellena cuando la fuente está incrustada

Sintaxis

property FontData[FontIndex: Integer]: TBytes; // solo lectura

Descripción

Devuelve los bytes en bruto del programa de fuente incrustado, solo se rellena cuando la fuente está incrustada La propiedad se indexa mediante un identificador de fuente obtenido de un carácter (FontHandle[CharIndex]) or directly enumerated through the page's font resources.

Solo lectura. PDFium consulta el valor subyacente de forma diferida desde el diccionario de fuentes o el programa de la fuente. Cuando el índice no coincide con una fuente conocida, la función lanza EPdfError.

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

Parámetros

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

Notas

Ejemplo

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;

Véase también

FontSize, FontWeight, FontFamilyName, FontIsEmbedded, CharacterFontSize