On 4 Sep 2008, at 11:27 pm, an0 wrote:

If they give no useful information for
application programmers,


Yes they do, but perhaps just not for your application. If you want to use glyphs as a graphic element for example, it's sometimes useful to query these sizes without having to try laying them out as text. Remember, there is a big difference, conceptually, between a string (a collection of characters) and a font (a collection of glyphs). Glyphs are graphical entities, and most of the stuff in NSFont and NSFontManager is there to support these concepts at that level.

Your problem (and confusion) appears to stem from the fact that you seem to think that a font is something like a string, and so can be treated as a collection of characters. The layout of glyphs to form an image of a string of text on the screen is a complex process, and applications that do this need to know all sorts of metrics beyond "how much space does this string occupy". In fact to calculate that they need to add up the space occupied by each glyph, and some of the methods you mentioned are there to support that sort of processing.

cheers, Graham
_______________________________________________

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 [EMAIL PROTECTED]

Reply via email to