Inherits from NSObject
Conforms to GSContainerProtocol
NSCoding
NSCopying

Overview

The class defining the instance object

Properties

customParameters

A list of GSCustomParameter objects

@property (strong, nonatomic) NSMutableArray *customParameters

exports

If it should be exported.

@property (nonatomic) BOOL exports

font

reference to the containing font

@property (unsafe_unretained, nonatomic) GSFont *font

instanceDict

The content of the instance to store it in a pList.

@property (unsafe_unretained) NSDictionary *instanceDict

instanceInterpolations

A dict that contains the interpolation coefficents for each master.

@property (strong, nonatomic) NSDictionary *instanceInterpolations

Discussion

This is automatcially updated if you change interpolationWeight, interpolationWidth, interpolationCustom. It contains FontMaster IDs as keys and coeffients for that master as values.

Or, you can set it maually if you set manualInterpolation to true. There is no UI for this, so you need to do that with a script

interpolationCustom

The interpolation Cutom position

@property (nonatomic) float interpolationCustom

interpolationCustom1

The interpolation Cutom position

@property (nonatomic) float interpolationCustom1

interpolationCustom2

The interpolation Cutom position

@property (nonatomic) float interpolationCustom2

interpolationWeight

The interpolation Weight position.

@property (nonatomic) float interpolationWeight

interpolationWidth

The interpolation Width position

@property (nonatomic) float interpolationWidth

isBold

the Style linking Bold bit

@property (nonatomic) BOOL isBold

isItalic

the Style linking Italic bit

@property (nonatomic) BOOL isItalic

linkStyle

The style to use as a the regular for this style.

@property (copy, nonatomic) NSString *linkStyle

Discussion

if styleName is Medium, you could link to Light. So this instance becomes the Bold stil for the Light.

manualInterpolation

Disables automatic calculation of instanceInterpolations

@property (nonatomic) BOOL manualInterpolation

Discussion

This allowes to manually setting instanceInterpolations.

name

The Intances name

@property (copy, nonatomic) NSString *name

Discussion

This is used as the style name.

tempData

To store stuff temporarily

@property (strong, nonatomic) NSMutableDictionary *tempData

Discussion

This is not saved to file

visible

If it should be visible in preview.

@property (nonatomic) BOOL visible

weightClass

Weight Class

@property (strong, nonatomic) NSString *weightClass

Discussion

e.g. Regular or Bold

weightClassValue

returnes the actual value as set by the weightClass or custom parameter “weightClass”

@property (nonatomic) NSUInteger weightClassValue

widthClass

Width Class

@property (strong, nonatomic) NSString *widthClass

Discussion

e.g. Medium (normal)

widthClassValue

returnes the actual value as set by the widthClass

@property (nonatomic) NSUInteger widthClassValue

Instance Methods

countOfCustomParameters

The count of custom parameters

- (NSUInteger)countOfCustomParameters

customParameterForKey:

The custom parameter where name == Key

- (GSCustomParameter *)customParameterForKey:(NSString *)Key

Parameters

Key

The name of the paremter

Return Value

the first matching paramter

customValueForKey:

The value of the custom parameter where name == Key

- (id)customValueForKey:(NSString *)Key

Parameters

Key

The name of the paremter

Return Value

the value of the first matching parameter

instanceInterpolationsWithUpdates:

Calculates the coefficients for the given masters

- (NSDictionary *)instanceInterpolationsWithUpdates:(BOOL)UpdateKVO

Parameters

masters

A list of GSFontMaster objects

Return Value

a dict of FontMaster IDs as keys and coeffients as values.

Discussion

This is used to automatically calculate the instanceInterpolations

removeObjectFromCustomParametersForKey:

Removes the first paramter with then Name

- (void)removeObjectFromCustomParametersForKey:(NSString *)Key

Parameters

Key

The name

scaleBy:

Scales the instance object.

- (void)scaleBy:(CGFloat)Scale

Parameters

Scale

Scale value

setCustomParameter:forKey:

Set the value for key

- (void)setCustomParameter:(id)value forKey:(NSString *)key

Parameters

value

The value to add

key

The name of the paramter

Discussion

It will look for an existing paramter with the name an overwrite its value, or adds a new parameter

updateInterpolationValues

Call it if you have made changes to the instance to force an update of instanceInterpolations.

- (void)updateInterpolationValues