THotPDF lettertype-fallback-methoden
Configureert geordende fallback-gezichten en stelt dekkings- en verticale-metric-diagnostiek bloot
Declaraties
procedure SetFontFallbackChain(Script: THPDFFontScript;
const FontNames: array of AnsiString);
procedure ClearFontFallbackChain(Script: THPDFFontScript);
procedure ClearAllFontFallbackChains;
function FontFallbackCount(Script: THPDFFontScript): Integer;
function FontFallbackName(Script: THPDFFontScript;
Index: Integer): AnsiString;
function FontScriptForCodePoint(CodePoint: Cardinal): THPDFFontScript;
function ResolveFontForCodePoint(CodePoint: Cardinal;
const PrimaryFontName: AnsiString;
out ResolvedFontName: AnsiString): boolean; overload;
function ResolveFontForCodePoint(CodePoint: Cardinal;
const PrimaryFontName: AnsiString; const FontStyle: TFontStyles;
out ResolvedFontName: AnsiString): boolean; overload;
function AnalyzeUnresolvedGlyphs(const Text: WideString;
const PrimaryFontName: AnsiString): THPDFUnresolvedGlyphInfoArray; overload;
function AnalyzeUnresolvedGlyphs(const Text: WideString;
const PrimaryFontName: AnsiString; const FontStyle: TFontStyles):
THPDFUnresolvedGlyphInfoArray; overload;
function GetUnresolvedGlyphs: THPDFUnresolvedGlyphInfoArray;
procedure ClearUnresolvedGlyphs;
function GetVerticalGlyphMetrics(CodePoint: Cardinal;
out AdvanceY, OriginY: Integer): boolean;
procedure SetVerticalDefaultMetrics(AdvanceY, OriginY: Integer);
Types
THPDFFontScript = (hfsCommon, hfsLatin, hfsGreek, hfsCyrillic,
hfsHebrew, hfsArabic, hfsIndic, hfsSoutheastAsian, hfsCJK,
hfsKana, hfsHangul, hfsEmoji, hfsOther);
THPDFUnresolvedGlyphInfo = record
CodePoint: Cardinal;
FontName: AnsiString;
Script: THPDFFontScript;
SuggestedFonts: AnsiString;
end;
THPDFUnresolvedGlyphInfoArray = array of THPDFUnresolvedGlyphInfo;
Lid-onderwerpen
- SetFontFallbackChain
- ClearFontFallbackChain
- ClearAllFontFallbackChains
- FontFallbackCount
- FontFallbackName
- FontScriptForCodePoint
- ResolveFontForCodePoint
- AnalyzeUnresolvedGlyphs
- GetUnresolvedGlyphs
- ClearUnresolvedGlyphs
- GetVerticalGlyphMetrics
- SetVerticalDefaultMetrics
- VerticalDefaultAdvanceY
- VerticalDefaultOriginY
Gedrag
ResolveFontForCodePointcontroleert eerst het primaire gezicht, daarna de overeenkomstige scriptketen, danhfsCommon- Het resultaat is alleen waar wanneer een geïnstalleerd gezicht de scalar oplost zonder GDI-gezichtsubstitutie
- Herhaalde familie-, gezichtsstijl- en scalar-probes gebruiken een begrensde 1024-vermeldingencache die wordt ongeldig gemaakt na privé-lettertype-registratie
- Overloads met expliciete stijl inspecteren het geselecteerde vette of cursieve gezicht; oorspronkelijke overloads behouden het gedrag voor gewone gezichten
AnalyzeUnresolvedGlyphsdedupliceert herhaalde niet-opgeloste scalar- en primair-gezicht-parenGetVerticalGlyphMetricsretourneert geregistreerde OpenType-verticale metrics indien beschikbaar en stelt de geconfigureerde standaarden anders blootSetVerticalDefaultMetricsvereist een positieve advance in 1000-eenheid-glyph-ruimte