• 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
Re: Detect/Disable Font Fallbacks in NSLayoutManager
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Detect/Disable Font Fallbacks in NSLayoutManager


  • Subject: Re: Detect/Disable Font Fallbacks in NSLayoutManager
  • From: Douglas Davidson <email@hidden>
  • Date: Tue, 15 Jul 2008 11:13:57 -0700


On Jul 15, 2008, at 10:54 AM, Chip Bradford wrote:

What seems to be happening is the [NSString drawAtPoint:withAttributes:] method is happily performing font substitution to render the missing glyphs, and [NSLayoutManager glyphAtIndex:] method is giving me the glyphID in that fallback font as well. However, I have no way of knowing when I'm getting back glyphIDs from my chosen font and when I'm getting glyphIDs from the fallback font (nor do I know what that fallback font is) so I can't figure out how I would go about looking up the correct bounding boxes. (I end up looking up the bounding-box for the glyphID in the wrong font).

You can get the substituted font easily--just ask the text storage for the value of the font attribute for the corresponding character. However, you might be better off asking the layout manager for geometry information rather than asking the font for the bounding box. In general, of course, you can't assume a one-to-one correspondence between characters and glyphs, so single-character strings won't reproduce all of the features of general layout.


Douglas Davidson

_______________________________________________

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


  • Follow-Ups:
    • Re: Detect/Disable Font Fallbacks in NSLayoutManager
      • From: Chip Bradford <email@hidden>
References: 
 >Detect/Disable Font Fallbacks in NSLayoutManager (From: Chip Bradford <email@hidden>)

  • Prev by Date: Re: how to add modal dialog once application begin to run
  • Next by Date: [[NSDate alloc] initWithString] crashes with valid string
  • Previous by thread: Detect/Disable Font Fallbacks in NSLayoutManager
  • Next by thread: Re: Detect/Disable Font Fallbacks in NSLayoutManager
  • Index(es):
    • Date
    • Thread