Namespace Ot.Var

Foundation Types

Type Ot.Var.Value

An immutable, opaque union type of number and an internal class implements a quantity that varies under OpenType Variation rules. Use Ot.Var.Ops to create and manipulate them.

Class Ot.Var.Dim

An object type representing a “variation dimension” in a variable font. Its object identity is significant, and is used to distinguish dimensions of a variable font's design space.

Class Ot.Fvar.Axis in Ot.Fvar contains such dimension object, with extra properties for naming, identification, etc.

Constructor

  • new Ot.Var.Dim(tag:Tag,​minValue:number,​defaultValue:number,​maxValue:number)

Properties

Type Ot.Var.DesignSpace

Aliased to Data.Order<Ot.Var.Dim>.

Datatype Ot.Var.Instance

Defined as Data.Maybe<readonly Map<Ot.Var.Dim,​number>>.

Datatype Ot.Var.MasterDim

Properties

Class Ot.Var.Master

Constructor

Properties

Methods

Class Ot.Var.MasterSet

A master set collects masters and associates an unique number to masters that are distinguishable. Equivalent masters will share same index.

Inherits

Constructor

Methods

  • get(master:Ot.Var.Master):​undefined | ​{index:number,​master:Ot.Var.Master}

    Query the records and return the index and corresponding collected masters, or undefined if the master is not recorded.

  • getOrPush(master:Ot.Var.Master):​undefined | ​{index:number,​master:Ot.Var.Master}

    Query the records and return the index and corresponding collected masters, or add it into the record if it is not collected. Returns undefined when the master is considered invalid.

Operations

Singleton Ot.Var.Ops

Properties

Vector space methods

Variation methods

Class Ot.Var.ValueFactory

Constructor

Properties

Methods