GetFontVariationAxes
Text, fonts, variable fonts
תיאור
Reads the fvar design axes of a TrueType or OpenType CFF2 variable font and returns their user-coordinate ranges as JSON
תחביר
Delphi
Function TPDFlib.GetFontVariationAxes(FontID: Integer; Out AxesJSON: WideString): Integer;פרמטרים
| FontID | A font handle returned by a TrueType or OpenType font creation or loading API |
|---|---|
| AxesJSON | Receives a JSON array containing each axis tag, localized display name, minimum, default, maximum and hidden state |
ערכים מוחזרים
Returns the number of axes, or 0 when the handle is invalid, the font has no usable fvar table or its data is malformed; AxesJSON is [] when no axes are returned
JSON format
[{"tag":"wght","name":"Weight","minimum":100,"default":400,"maximum":900,"hidden":false}]הערות
Axis values use the design coordinates defined by the font, before normalization and any avar mappingTrueType Collection handles inspect the face selected when the font was loaded
ראו גם
CreateTrueTypeFontVariation, CreateOpenTypeFontVariation, AddTrueTypeFont, AddTrueTypeFontFromFile