GSFeature Class Reference
Inherits from | NSObject |
Conforms to | NSCoding NSCopying |
Declared in | GSFeature.h |
Overview
The class defining the feature object
This class defines the feature object. It is used to store OpenType features in Adobe FDK syntax
Tasks
tag
code
– fullName
– propertyListValueFormat:
automatic
disabled
notes
– update
canBeAutomated
tempData
– setTempData:forKey:
– tempDataForKey:
labels
– countOfLabels
– objectInLabelsAtIndex:
– indexOfObjectInLabels:
– addLabel:
– insertObject:inLabelsAtIndex:
– removeObjectFromLabels:
– removeObjectFromLabelsAtIndex:
Properties
automatic
Feature will be automaticaly generated.
@property (nonatomic) BOOL automatic
Discussion
Defaults to YES, set it to NO if you want to edit the feature manually.
canBeAutomated
of the featureGenerator can generate the feature
@property (nonatomic, readonly) BOOL canBeAutomated
Instance Methods
addLabel:
Adds the label
- (void)addLabel:(GSFontInfoValue *)label
Parameters
- label
-
the object to be added
indexOfObjectInLabels:
Returns the index of label in labels
- (NSUInteger)indexOfObjectInLabels:(GSFontInfoValue
*)label
Parameters
- label
-
the object
Return Value
the index of the object
insertObject:inLabelsAtIndex:
Inserts the label at index into labels
- (void)insertObject:(GSFontInfoValue *)label
inLabelsAtIndex:(NSUInteger)idx
Parameters
- label
-
The object to insert
- idx
-
The index
objectInLabelsAtIndex:
Returns object at idx in labels
- (GSFontInfoValue
*)objectInLabelsAtIndex:(NSUInteger)idx
Parameters
- idx
-
The index
Return Value
the object at index
propertyListValueFormat:
Returns the content of the object to store it in pList.
- (NSDictionary
*)propertyListValueFormat:(GSFormatVersion)format
Parameters
- format
-
the version of the dict
Discussion
This is used to store the data in the .glyphs file.
removeObjectFromLabels:
Removes the label
- (void)removeObjectFromLabels:(GSFontInfoValue
*)label
Parameters
- label
-
the object to be removed
removeObjectFromLabelsAtIndex:
Removes the label at idx
-
(void)removeObjectFromLabelsAtIndex:(NSUInteger)idx
Parameters
- idx
-
The index
setTempData:forKey:
Adds key/value to tempData. Pass nil as value to remove previous set data
- (void)setTempData:(nullable id)value
forKey:(nonnull NSString *)key
Parameters
- value
-
and object or nil
- key
-
the key
tempDataForKey:
return value for key in tempData
- (nullable id)tempDataForKey:(nonnull NSString
*)key
Parameters
- key
-
the key
Return Value
a value or nil
update
Invoce this method to regenerate the feature
- (void)update
Discussion
If the feature is not set to be automatic, this does nothing