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

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

code

The feature representation in FDK syntax.

@property (strong, nonatomic) NSString *code

disabled

If True, the feature will not be exported.

@property (nonatomic) BOOL disabled

labels

The labels.

@property (nonatomic, strong) NSMutableArray<GSFontInfoValue*> *labels

notes

Some extra text.

@property (copy, nonatomic) NSString *notes

Discussion

Is shown in the bottom of the feature window.

Contains the stylistic set name parameter

tag

The feature tag.

@property (copy, nonatomic) NSString *tag

Discussion

e.g: “liga”, “smcp”, ..

tempData

a dictionary that stores data. It will not be written to disk.

@property (nonatomic, strong, nullable) NSDictionary *tempData

Instance Methods

addLabel:

Adds the label

- (void)addLabel:(GSFontInfoValue *)label

Parameters

label

the object to be added

countOfLabels

The number of labels

- (NSUInteger)countOfLabels

fullName

The full, localized name.

- (NSString *)fullName

Return Value

The name

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