• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
How to get Glyphs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Prev by Date: Re: CoreData and Threading
  • Next by Date: Glyphs without Unicode in WebView
  • Previous by thread: Intermittent scrolling problem in UITableView (2)
  • Next by thread: Glyphs without Unicode in WebView
  • Index(es):
    • Date
    • Thread