Inherits from NSObject

Properties

glyphGroupsTree

An array of glyph groups.

@property (readonly, nonatomic) NSArray *glyphGroupsTree

Discussion

This is used the build the filter tree in font view mode.

glyphInfos

The array containing the glyphs info data.

@property (strong, nonatomic) NSMutableArray *glyphInfos

weightClasses

The weight classes

@property (readonly, nonatomic) NSDictionary *weightClasses

widthClasses

The width classes

@property (readonly, nonatomic) NSDictionary *widthClasses

Class Methods

sharedManager

Returns the shared GlyphsInfos object.

+ (GSGlyphsInfo *)sharedManager

Instance Methods

convertToLegecyNames:font:

Converts all glyph names to production names

- (NSString *)convertToLegecyNames:(NSString *)string font:(GSFont *)font

Parameters

string

A string that contains glyph names like feature code.

Return Value

The string with converted names.

Discussion

This is useful for OT-feature code

glyphIndex:

Returns the index of the glyph in the database.

- (NSUInteger)glyphIndex:(GSGlyph *)Glyph

glyphInfoForGlyph:

Returns the GSGlyphInfo for the glyph with Glyph.

- (GSGlyphInfo *)glyphInfoForGlyph:(GSGlyph *)Glyph

Parameters

Glyph

The glyph.

Return Value

A GSGlyphInfo instance or nil.

glyphInfoForName:

Returns the GSGlyphInfo for the glyph with Name.

- (GSGlyphInfo *)glyphInfoForName:(NSString *)Name

Parameters

Name

The glyph name.

Return Value

A GSGlyphInfo instance or nil.

glyphInfoForUnicode:

Returns the GSGlyphInfo for the glyph with Unicode.

- (GSGlyphInfo *)glyphInfoForUnicode:(NSString *)Unicode

Parameters

Unicode

A unicode as Hex string.

Return Value

A GSGlyphInfo instance or nil.

lowerCaseName:

returns the name of the lowercase glyph name linked to the given uppercase name

- (NSString *)lowerCaseName:(NSString *)Name

Parameters

Name

a upper case glyph name

Return Value

the matching lower case name

Discussion

in most instances this is equivalent with [Name lowercaseString] but there are some exceptions. e.g. A > a, KoppaArchaic > koppaArchaic

niceGlyphNameForName:

Converts a name to a standardised name

- (NSString *)niceGlyphNameForName:(NSString *)name

Parameters

name

The name.

Return Value

The nice-name.

Discussion

e.g. converts afii10017 to A-cy

productionGlyphNameForName:

Converts a name to a production name

- (NSString *)productionGlyphNameForName:(NSString *)name

Parameters

name

The name.

Return Value

The production name.

updateAnchor:

Generates missing anchors in the Layer.

- (BOOL)updateAnchor:(GSLayer *)Layer

Parameters

Layer

The Layer

Return Value

YES if it changed anything.

updateGlyphInfo:changeName:

Updates the glyph info in the Glyph.

- (void)updateGlyphInfo:(GSGlyph *)glyph changeName:(BOOL)changeName

Parameters

glyph

The Glyph

changeName

Keep the name and only update unicode, categories and script