How to get Glyphs
How to get Glyphs
- Subject: How to get Glyphs
- From: "Gerriet M. Denkmann" <email@hidden>
- Date: Sat, 19 Nov 2011 13:59:34 +0700
I want to display glyphs which do NOT have a Unicode representation.
Currently I use Font Book.app to search for the Glyph and then code (following suggestions in Technical Note TN2079):
NSGlyph glyphNbr;
NSString *familyName = [ font familyName ];
if ( [ familyName isEqualToString: @"Thonburi" ] )
{
glyphNbr = 28 ;
}
else if ( [ familyName isEqualToString: @"Tahoma" ] )
{
glyphNbr = 1163 ;
}
else if ( [ familyName isEqualToString: @"Microsoft Sans Serif" ] )
{
glyphNbr = 907 ;
}
else // unknown font
{
NSLog(@"%s Error unknown font %@",__FUNCTION__, familyName);
return NO;
};
NSGlyphInfo *glyphInfo = [ NSGlyphInfo glyphInfoWithGlyph: glyphNbr forFont: font baseString: selectedString ];
[ textStorage addAttribute: NSGlyphInfoAttributeName value: glyphInfo range: selectedRange ];
But what to do in case of Arial Unicode MS (which has 50377 glyphs) ?
Generally: is there a better, more general way to get my glyph?
What I want is a NSFont method like
- (NSGlyph)glyphSimilarTo: @"ฐ" but: @"WithoutTheLittleCedillaBelow".
Unlikely that such a method exists (or could exist) - but is there at least something like:
- (NSArray *)variationsOfCharacter: @"ฐ"
Kind regards,
Gerriet.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden