GSGlyphsInfo Class Reference
Inherits from | NSObject |
Declared in | GSGlyphsInfo.h |
Tasks
sidebarCategories
glyphInfos
widthName2Classes
weightName2Classes
localisedWidthName2Classes
localisedWeightName2Classes
+ sharedManager
– glyphInfoForGlyph:
– glyphInfoForName:
– glyphInfoForUnicode:
– glyphIndex:
– lowerCaseName:
– updateGlyphInfo:changeName:
– updateAnchor:
– niceGlyphNameForName:
– productionGlyphNameForName:
– convertToLegacyNames:font:
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.
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
See Also
productionGlyphNameForName:
Converts a name to a production name
- (NSString *)productionGlyphNameForName:(NSString
*)name
Parameters
- name
-
The name.
Return Value
The production name.