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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to