Inherits from NSObject
Declared in GSGlyphsInfo.h

Properties

glyphInfos

The array containing the glyphs info data.

@property (strong, nonatomic) NSMutableArray *glyphInfos

localisedWeightName2Classes

The weight classes

@property (readonly, nonatomic, class) NSDictionary *localisedWeightName2Classes

localisedWidthName2Classes

The width classes

@property (readonly, nonatomic, class) NSDictionary *localisedWidthName2Classes

sidebarCategories

An array of glyph groups.

@property (readonly, nonatomic) NSMutableArray *sidebarCategories

Discussion

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

weightName2Classes

The weight classes

@property (readonly, nonatomic, class) NSDictionary *weightName2Classes

widthName2Classes

The width classes

@property (readonly, nonatomic, class) NSDictionary *widthName2Classes

Class Methods

sharedManager

Returns the shared GlyphsInfos object.

+ (GSGlyphsInfo *)sharedManager

Instance Methods

convertToLegacyNames:font:

Converts all glyph names to production names

- (NSString *)convertToLegacyNames:(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