GSInstance Class Reference
| Inherits from | NSObject |
| Conforms to | GSContainerProtocol NSCoding NSCopying |
Tasks
Other Methods
-
fontproperty
info
-
nameproperty -
linkStyleproperty -
interpolationWeightproperty -
interpolationWidthproperty -
interpolationCustomproperty -
interpolationCustom1property -
interpolationCustom2property -
weightClassproperty -
weightClassValueproperty -
widthClassproperty -
widthClassValueproperty -
exportsproperty -
visibleproperty -
isItalicproperty -
isBoldproperty -
instanceDictproperty -
tempDataproperty -
instanceInterpolationsproperty -
manualInterpolationproperty -
– instanceInterpolationsWithUpdates: -
– updateInterpolationValues
customParameters
Properties
customParameters
A list of GSCustomParameter objects
@property (strong, nonatomic) NSMutableArray *customParametersinstanceDict
The content of the instance to store it in a pList.
@property (unsafe_unretained) NSDictionary *instanceDictinstanceInterpolations
A dict that contains the interpolation coefficents for each master.
@property (strong, nonatomic) NSDictionary *instanceInterpolationsDiscussion
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 interpolationCustominterpolationCustom1
The interpolation Cutom position
@property (nonatomic) float interpolationCustom1interpolationCustom2
The interpolation Cutom position
@property (nonatomic) float interpolationCustom2interpolationWeight
The interpolation Weight position.
@property (nonatomic) float interpolationWeightlinkStyle
The style to use as a the regular for this style.
@property (copy, nonatomic) NSString *linkStyleDiscussion
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 manualInterpolationDiscussion
This allowes to manually setting instanceInterpolations.
name
The Intances name
@property (copy, nonatomic) NSString *nameDiscussion
This is used as the style name.
tempData
To store stuff temporarily
@property (strong, nonatomic) NSMutableDictionary *tempDataDiscussion
This is not saved to file
weightClass
Weight Class
@property (strong, nonatomic) NSString *weightClassDiscussion
e.g. Regular or Bold
weightClassValue
returnes the actual value as set by the weightClass or custom parameter “weightClass”
@property (nonatomic) NSUInteger weightClassValuewidthClass
Width Class
@property (strong, nonatomic) NSString *widthClassDiscussion
e.g. Medium (normal)
widthClassValue
returnes the actual value as set by the widthClass
@property (nonatomic) NSUInteger widthClassValueInstance Methods
customParameterForKey:
The custom parameter where name == Key
- (GSCustomParameter *)customParameterForKey:(NSString *)KeyParameters
- 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 *)KeyParameters
- 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)UpdateKVOParameters
- 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 *)KeyParameters
- Key
The name
setCustomParameter:forKey:
Set the value for key
- (void)setCustomParameter:(id)value forKey:(NSString *)keyDiscussion
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