• 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: NSGlyph from Unicode
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSGlyph from Unicode


  • Subject: Re: NSGlyph from Unicode
  • From: Douglas Davidson <email@hidden>
  • Date: Thu, 14 Sep 2006 09:36:46 -0700


On Sep 13, 2006, at 7:15 PM, Pascal Goguey wrote:

Now, in the "number of things I am missing", I understand that the actual shape of a
character depends on the font and may also depend on the surrounding characters.
That's why I ended up using a layout manager because I think the layout manager
should have the info I need (i.e. the right glyph at the right place).


What I am doing: I put the incoming text into a textstorage object. The text storage
then gets a layout manager that should take care of its contents. Now if I ask
the layout manager for its glyphs, shouldn't it give me the right values?


Here is a simplified version of my method. All objects are supposed to be created
somewhere and to exist. For simplicity purposes, I didn't add any test for validity.
Which step is wrong? Is there a missing step?



There are a couple of missing things. First, you need to look not just at the glyphs, but also at their positions. The positions will tell you which glyphs have been positioned or reordered relative to each other, and asking for the positions will force layout, which will also do any contextual glyph modifications. Second, you need to go back to the text storage for the fonts, rather than just using the [NSFont boldSystemFontOfSize:size] that you set initially--this is because the fonts for some characters may have changed during font fixing.


Douglas Davidson

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Re: NSGlyph from Unicode (From: Pascal Goguey <email@hidden>)

  • Prev by Date: NSBorderlessWindowMask on a sheet
  • Next by Date: Re: NSTextField not updating NSUserDefaults using bindings
  • Previous by thread: Re: NSGlyph from Unicode
  • Next by thread: Job Offer: Cocoa Client/Server/Graphics Software Engineer
  • Index(es):
    • Date
    • Thread