GSInstance Class Reference
Inherits from | NSObject |
Conforms to | GSContainerProtocol NSCoding NSCopying |
Tasks
Other Methods
-
font
property
info
-
name
property -
linkStyle
property -
interpolationWeight
property -
interpolationWidth
property -
interpolationCustom
property -
interpolationCustom1
property -
interpolationCustom2
property -
weightClass
property -
weightClassValue
property -
widthClass
property -
widthClassValue
property -
exports
property -
visible
property -
isItalic
property -
isBold
property -
instanceDict
property -
tempData
property -
instanceInterpolations
property -
manualInterpolation
property -
– instanceInterpolationsWithUpdates:
-
– updateInterpolationValues
customParameters
Properties
customParameters
A list of GSCustomParameter objects
@property (strong, nonatomic) NSMutableArray *customParameters
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
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
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
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
setCustomParameter:forKey:
Set the value for key
- (void)setCustomParameter:(id)value forKey:(NSString *)key
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