Preparing search index...

    Class VariationAxisInfo

    Read-only metadata describing one OpenType variation axis on a variable font. Returned from Font#variationAxes.

    Lens Scripting Version 372

    //@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);
    }
    }
    Index

    Properties

    defaultValue: number

    Value the axis takes when no override is applied.

    Lens Scripting Version 372

    maxValue: number

    Highest value the axis accepts.

    Lens Scripting Version 372

    minValue: number

    Lowest value the axis accepts.

    Lens Scripting Version 372

    name: string

    Human-readable axis name from the font, for example "Weight".

    Lens Scripting Version 372

    tag: string

    Four-character OpenType axis tag, for example "wght" for weight.

    Lens Scripting Version 372

    Methods

    • 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 string

      Lens Scripting Version 372

    • Debug-friendly string, e.g. {tag: "wght", name: "Weight", min: 100, default: 400, max: 1000}.

      Returns string

      Lens Scripting Version 372