THPDFFontDecoder Record

Contiene le tabelle di decodifica risolte e le metriche di larghezza per un font PDF caricato, costruite dalla catena di fallback di decodifica dei font

Dichiarazione

THPDFFontDecoder= record
  FontKey: AnsiString;             // resource key (e.g. /F1) for diagnostics
  Subtype: AnsiString;             // Type0, Type1, TrueType, CIDFontType2
  Strategies: THPDFFontStrategies; // which fallbacks are populated
  ToUnicodeMap: THPDFCMapParseResult;
  EncodingMap: THPDFCMapParseResult;        // /Encoding stream or named CMap
  PredefinedEncoding: AnsiString;           // 'WinAnsiEncoding' etc
  CIDToGIDIdentity: boolean;
  CIDToGIDs: array of Word;                 // binary CIDToGIDMap stream
  CIDToUnicode: THPDFCIDToUnicodeTable;     // cid2code.txt fallback
  GlyphNameUnicode: array[0.. 255] of Cardinal;
  GIDToUnicode: THPDFUnicodeByGID;
  // v2.505.0 simple-font /Widths (PDF 1.7 9.6.3 Table 111). Index =
  // (code - FirstChar); values are 1/1000-em glyph advances. Empty when
  // the font has no /Widths array (the interpreter falls back to 0.5*fs)
  Widths: array of Double;
  FirstChar: Integer;
  LastChar: Integer;
  CIDWidths: THPDFCIDWidthRanges;
  CIDDefaultWidth: Double;
  // Vertical (WMode 1) counterparts from the descendant CIDFont /W2 and
  // /DW2 (ISO 32000-1 9.7.4.3). Each /W2 metric is a [w1y v1x v1y]
  // triple: w1y is the displacement along the writing axis, v1x/v1y the
  // position vector from the glyph's horizontal origin to its vertical
  // origin. A range entry (cFirst cLast w1y v1x v1y) stores one triple;
  // a list entry (c [w1y v1x v1y ...]) stores one triple per CID from
  // FirstCID to LastCID. VerticalWriting gates the resolver's vertical
  // branch
  CIDVertWidths: THPDFCIDWidthRanges;
  CIDVertDefaultAdvance: Double;       // /DW2 w1y (second entry); default -1000
  CIDVertDefaultOriginY: Double;       // /DW2 v1y (first entry); default 880
  VerticalWriting: boolean;
  Ascent: Double;
  Descent: Double;
  HasVerticalMetrics: boolean;
  CodeUnitBytes: Integer;                    // bytes per char code
  OK: boolean;
end;

Unità

HPDFTextExtraction

Campi

CampoScopo
FontKeyChiave di risorsa come /F1 che nomina il font, tenuta per i diagnostici
SubtypeSottotipo del dizionario del font: Type0, Type1, TrueType, CIDFontType2 e simili
StrategiesInsieme delle strategie di fallback popolate con successo
ToUnicodeMapCMap /ToUnicode analizzata con voci bfchar e bfrange, priorità massima
EncodingMapStream /Encoding analizzato o CMap nominata
PredefinedEncodingNome di codifica predefinita come WinAnsiEncoding
CIDToGIDIdentityTrue quando il CIDToGIDMap è Identity e non serve una tabella esplicita
CIDToGIDsStream CIDToGIDMap binario espanso a un Word per CID
CIDToUnicodeTabella CID a Unicode dal fallback cid2code.txt
GlyphNameUnicodeTabella a 256 voci da nome glifo a Unicode usata dal recupero /Differences
GIDToUnicodeCMap incorporata invertita da glyph ID a Unicode
WidthsAvanzamenti /Widths del font semplice in 1/1000 di em, indicizzati per codice meno FirstChar
FirstCharPrimo codice carattere supportato dell'array Widths
LastCharUltimo codice carattere supportato dell'array Widths
CIDWidthsIntervalli di larghezza CID dall'array /W del CIDFont
CIDDefaultWidthAvanzamento CID predefinito da /DW
CIDVertWidthsMetriche verticali /W2 memorizzate come triple [w1y v1x v1y] per CID o intervallo
CIDVertDefaultAdvanceSpostamento verticale predefinito da /DW2 w1y, per predefinito -1000
CIDVertDefaultOriginYOrigine verticale predefinita da /DW2 v1y, per predefinito 880
VerticalWritingTrue quando le metriche WMode 1 abilitano il ramo verticale del resolver
AscentAscent del font letto dalle metriche del font descriptor
DescentDescent del font letto dalle metriche del font descriptor
HasVerticalMetricsTrue quando sono state trovate metriche verticali per il font
CodeUnitBytesByte per codice carattere, risposto all'interprete di contenuto per il font
OKTrue quando almeno una strategia di decodifica è utilizzabile

Note sull'utilizzo

API correlate