VariationAxisInfo
ClassRead-only metadata describing one OpenType variation axis on a variable font.
- Available on all platforms
Since Lens Scripting v372
Read-only metadata describing one OpenType variation axis on a variable font. Returned from Font#variationAxes.
Index
Properties
Methods
Example
//@input Asset.Font fontAsset
if (script.fontAsset.isVariableFont) {
var axes = script.fontAsset.variationAxes;
for (var i = 0; i < axes.length; i++) {
var axis = axes[i];
print(axis.name + " (" + axis.tag + "): " + axis.minValue +
" to " + axis.maxValue + ", default " + axis.defaultValue);
}
}
Properties
defaultValue
readonlydefaultValue:number
Value the axis takes when no override is applied.
Since
Lens Scripting Version 372
maxValue
readonlymaxValue:number
Highest value the axis accepts.
Since
Lens Scripting Version 372
minValue
readonlyminValue:number
Lowest value the axis accepts.
Since
Lens Scripting Version 372
name
readonlyname:string
Human-readable axis name from the font, for example "Weight".
Since
Lens Scripting Version 372
tag
readonlytag:string
Four-character OpenType axis tag, for example "wght" for weight.
Since
Lens Scripting Version 372
Methods
getTypeName()
staticgetTypeName():TypeName<VariationAxisInfo>
Returns the fully-qualified JavaScript type name for this class (for example, "Component.Camera"). This is a static accessor (no instance required) and returns the same value as the instance getTypeName().
Returns
TypeName<VariationAxisInfo>
Since
Lens Scripting Version 372
toString()
toString():
string
Debug-friendly string, e.g. {tag: "wght", name: "Weight", min: 100, default: 400, max: 1000}.
Returns
string
Since
Lens Scripting Version 372