Class
GSInstance
Declaration
class GSInstanceDeclaration
@interface GSInstance : NSObjectDeclaration
class GSInstance(NSObject)Topics
Initializers
Initializes a new instance of the GSInstance class with a dictionary and format version.
Initializes a new instance of the GSInstance class with a type.
Initializes a new instance of the GSInstance class with a type name.
Instance Properties
The axis values of the instance.
A list of the axis values.
A list of custom parameter objects.
Indicates if the instance should be exported.
Reference to the containing font
An array of icon presets.
A unique identifier for the instance that does not change when other properties such as the same are changed.
A dictionary that contains the interpolation coefficients for each master. This is automatically updated if you change interpolationWeight, interpolationWidth, interpolationCustom. It contains FontMaster IDs as keys and coefficients for that master as values. Or, you can set it manually if you set manualInterpolation to true. There is no UI for this, so you need to do that with a script.
The style linking bold bit.
The style linking italic bit.
Indicates if the instance is visible in Preview > Show All instances.
The style to use as the regular for this style. If styleName is
Medium, you could link toLight. So this instance becomes the Bold style for the Light.Disables automatic calculation of instanceInterpolations This allows manually setting instanceInterpolations.
The name of the instance. This is used as the style name.
the name particle.
A list of property objects.
The read buffer dictionary.
A dictionary that stores temporary data. It will not be written to disk.
The type of the instance.
The name of the instance type.
The user data dictionary.
The weight class UI string (e.g. Regular or Bold).
The actual weight class value as set by the weightClass or custom parameter “weightClass”.
The width class UI string (e.g. Medium).
The actual width class value as set by the widthClass.
Instance Methods
Adds a custom parameter.
Adds a property object to the properties array.
Returns the external axis value for a specific ID.
Returns the internal axis value for a specific ID.
Returns the axis value for a specific ID.
Returns the axis value for a specific ID. (Deprecated)
Returns the coordinate for a specific axis index.
The count of customParameters
The number of properties
Returns the boolean value of the custom parameter for the specified key.
Returns the boolean value of the custom parameter for the specified key, or the default value if not found.
Returns the color value of the custom parameter for the specified key.
Returns the custom parameter object for the specified key.
Returns the active custom parameter object for the specified key.
Returns the value of the custom parameter for the specified key.
Returns the default property for the specified name.
Returns the file name with the specified format.
Returns the filtered masters for the specified font.
Returns the file name with the specified format. It includes the “Export Folder” part.
Returns the font name.
Returns the full name.
Returns the index of the specified icon preset in iconPresets.
Returns the index of the specified property in properties.
Inserts a custom parameter at the specified index.
Inserts a property object at the specified index in the properties array.
Returns the instance interpolations with updates.
Returns the instance key.
The interpolated font proxy.
Invalidates the custom parameter cache.
Checks if the instance is equal to another instance.
Returns the name for the UI.
Returns the custom parameter object at the specified index.
Returns the property object at the specified index.
Returns the outline format.
Performs post-read operations.
Returns the PostScript name prefix.
Returns the preferred family names.
Returns the preferred subfamily names.
Returns the property for the specified name.
Returns the property for the specified name and language tag.
Returns the content of the object to store it in pList.
Removes the specified custom parameter.
Removes a property object from the properties array.
Removes the custom parameter at the specified index.
Removes the first custom parameter with the specified key.
Removes the property object at the specified index from the properties array.
Replaces the custom parameter at the specified index with a new custom parameter.
Saves the instance to a file with the specified format version.
Scales the instance object.
Sets the external axis value for a specific ID.
Sets the internal axis value for a specific ID.
Sets the axis value for a specific ID.
Sets the axis value quickly without copying data for a specific ID.
Sets the axis value for a specific ID. (Deprecated)
Sets the value for the custom parameter with the specified key.
Sets the default property for the specified name.
Adds a new font info value to the array specified by
keyor updates an existing one.Adds key/value to tempData. Pass nil as value to remove previously set data.
Returns the style map family names.
Returns the style map style names.
Returns the value for the specified key in tempData.
Call it if you have made changes to the instance to force an update of instanceInterpolations.
Type Methods
Returns an array of allowed property keys.
Topics
Instance Properties
The axis values of the instance.
A list of the axis values.
A list of custom parameter objects.
Indicates if the instance should be exported.
Reference to the containing font
An array of icon presets.
A unique identifier for the instance that does not change when other properties such as the same are changed.
A dictionary that contains the interpolation coefficients for each master. This is automatically updated if you change interpolationWeight, interpolationWidth, interpolationCustom. It contains FontMaster IDs as keys and coefficients for that master as values. Or, you can set it manually if you set manualInterpolation to true. There is no UI for this, so you need to do that with a script.
The style linking bold bit.
The style linking italic bit.
Indicates if the instance is visible in Preview > Show All instances.
The style to use as the regular for this style. If styleName is
Medium, you could link toLight. So this instance becomes the Bold style for the Light.Disables automatic calculation of instanceInterpolations This allows manually setting instanceInterpolations.
The name of the instance. This is used as the style name.
the name particle.
A list of property objects.
The read buffer dictionary.
A dictionary that stores temporary data. It will not be written to disk.
The type of the instance.
The name of the instance type.
The user data dictionary.
The weight class UI string (e.g. Regular or Bold).
The actual weight class value as set by the weightClass or custom parameter “weightClass”.
The width class UI string (e.g. Medium).
The actual width class value as set by the widthClass.
Instance Methods
Adds a custom parameter.
Adds a property object to the properties array.
Returns the external axis value for a specific ID.
Returns the internal axis value for a specific ID.
Returns the axis value for a specific ID.
Returns the axis value for a specific ID. (Deprecated)
Returns the coordinate for a specific axis index.
The count of customParameters
The number of properties
Returns the boolean value of the custom parameter for the specified key.
Returns the boolean value of the custom parameter for the specified key, or the default value if not found.
Returns the color value of the custom parameter for the specified key.
Returns the custom parameter object for the specified key.
Returns the active custom parameter object for the specified key.
Returns the value of the custom parameter for the specified key.
Returns the default property for the specified name.
Returns the file name with the specified format.
Returns the filtered masters for the specified font.
Returns the file name with the specified format. It includes the “Export Folder” part.
Returns the font name.
Returns the full name.
Returns the index of the specified icon preset in iconPresets.
Returns the index of the specified property in properties.
Initializes a new instance of the GSInstance class with a dictionary and format version.
Initializes a new instance of the GSInstance class with a type.
Initializes a new instance of the GSInstance class with a type name.
Inserts a custom parameter at the specified index.
Inserts a property object at the specified index in the properties array.
Returns the instance interpolations with updates.
Returns the instance key.
The interpolated font proxy.
Invalidates the custom parameter cache.
Checks if the instance is equal to another instance.
Returns the name for the UI.
Returns the custom parameter object at the specified index.
Returns the property object at the specified index.
Returns the outline format.
Performs post-read operations.
Returns the PostScript name prefix.
Returns the preferred family names.
Returns the preferred subfamily names.
Returns the property for the specified name.
Returns the property for the specified name and language tag.
Returns the content of the object to store it in pList.
Removes the specified custom parameter.
Removes a property object from the properties array.
Removes the custom parameter at the specified index.
Removes the first custom parameter with the specified key.
Removes the property object at the specified index from the properties array.
- replaceObjectInCustomParametersAtIndex:
withObject: replaceObjectInCustomParametersAtIndex_withObject_ Replaces the custom parameter at the specified index with a new custom parameter.
Saves the instance to a file with the specified format version.
Scales the instance object.
Sets the external axis value for a specific ID.
Sets the internal axis value for a specific ID.
Sets the axis value for a specific ID.
Sets the axis value quickly without copying data for a specific ID.
Sets the axis value for a specific ID. (Deprecated)
Sets the value for the custom parameter with the specified key.
Sets the default property for the specified name.
Adds a new font info value to the array specified by
keyor updates an existing one.Adds key/value to tempData. Pass nil as value to remove previously set data.
Returns the style map family names.
Returns the style map style names.
Returns the value for the specified key in tempData.
Call it if you have made changes to the instance to force an update of instanceInterpolations.
Type Methods
Returns an array of allowed property keys.
Relationships
Inherits From
NSObject
Conforms To
NSCodingNSCopying- GSContainerProtocol
- GSParametersAndPropertiesProtocol
- GSUserDataProtocol
ObjectiveC.NSObjectProtocolSwift.CVarArgSwift.CustomDebugStringConvertibleSwift.CustomStringConvertibleSwift.EquatableSwift.Hashable
Relationships
Inherits From
NSObject
Conforms To
See Also
Essentials
The top-level model object of a Glyphs document.
A named glyph and its layer collection in a font.
The drawing and editing representation of a glyph.
GSAxisrepresents an axis in aGSFontobject.