CreateOpenTypeFontVariation
Text, fonts, variable fonts
Opis
Instantizuje variabilný font OpenType CFF2 na požadovaných súradniciach design osí a výsledný statický CFF font pridá do aktuálneho dokumentu
Syntax
Delphi
Function TPDFlib.CreateOpenTypeFontVariation(FontID: Integer; Const AxisCoordinates: WideString): Integer;Parameters
| FontID | A CFF2 variable-font handle returned by an OpenType font creation or loading API |
|---|---|
| AxisCoordinates | Comma- or semicolon-separated tag=value pairs such as wght=700,wdth=75; omitted axes use their defaults and values outside a declared range are clamped |
Return values
Returns a positive font handle and selects it on success, or 0 for an invalid handle, non-CFF2 font, unknown or malformed coordinate, unsupported CFF2 structure or malformed variation data
Poznámky
The instantiator evaluates vsindex and blend against the CFF2 variation store, expands local and global subroutines, applies HVAR horizontal metrics and supported MVAR global metrics, and synchronizes common style axesThe output is a checksum-correct CID-keyed CFF1 OpenType font with static charstrings and metrics; stale variation, hint-program and signature tables are removed
Rekurzia CharString, využitie operandového zásobníka, počet operácií, veľkosti INDEX a veľkosť výstupu sa ohraničia pred alokáciou, takže deformovaný vstup zlyhá bez vrátenia čiastočného fontuVrátený font funguje s kreslením, vkladaním, CFF subsetting a
SaveFontToFile; GetFontVariationAxes returns 0 for itLoading a CFF2 font directly selects its default static instance while retaining the original variable program for later calls to this API
Use
CreateTrueTypeFontVariation for variable fonts that use glyf outlines
Pozri tiež
GetFontVariationAxes, CreateTrueTypeFontVariation, AddOpenTypeFontFromFile, SaveFontToFile