Preparing search index...

    Class CustomVariationStyle

    A user-defined named style on a variable Font. Holds the standard variation axis values (weight, width, slant, italic, opticalSize) plus any custom axes the font exposes (e.g. GRAD, YOPQ). Create via Font.createVariationStyle.

    //@input Asset.Font fontAsset
    //@input Component.Text text
    var style = script.fontAsset.createVariationStyle("CustomStyle");
    style.weight = 565;
    style.GRAD = 14;
    script.text.preferredStyle = style.name;

    Hierarchy (View Summary)

    Indexable

    • [index: string]: any
    Index

    Properties

    italic: boolean

    Italic axis value (ital). If no ital axis is present, changes slant axis value (slnt) instead.

    Lens Scripting Version 372

    false
    
    name: string

    Name of the custom variation style. Used to assign to Text.preferredStyle to change style to custom style.

    Lens Scripting Version 372

    opticalSize: number

    Optical size axis value (opsz).

    Lens Scripting Version 372

    48
    
    slant: number

    Slant axis value (slnt), in degrees.

    Lens Scripting Version 372

    0
    
    weight: number

    Weight axis value (wght).

    Lens Scripting Version 372

    400
    
    width: number

    Width axis value (wdth).

    Lens Scripting Version 372

    100
    

    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

    • Returns true if the object matches or derives from the passed in type.

      Parameters

      • type: string

      Returns boolean

    • Returns true if this object is the same as other. Useful for checking if two references point to the same thing.

      Parameters

      Returns boolean