Re: Valid glyphs in NSLayoutManager
Re: Valid glyphs in NSLayoutManager
- Subject: Re: Valid glyphs in NSLayoutManager
- From: Douglas Davidson <email@hidden>
- Date: Tue, 10 Sep 2002 13:06:39 -0700
On Tuesday, September 10, 2002, at 08:20 AM, Brock Brandenberg wrote:
I have an application where I'm walking the glyph range in an
NSLayoutManager and retrieving the bounding boxes for the glyphs, but
I'm
seeing valid glyphs that really aren't valid. For example, when
setting the
title "Breckenridge" in Zapfino font, NSLayoutManager returns a range
of
{0,12} and each glyph is a valid index, but two of the glyphs have a
value
of zero. Interestingly, these two glyphs actually have bounding boxes
(in
the font specified by their attributes) and they're different from one
another, but they don't apply to any visible glyphs. As a result, I
get a
true boolean union of all the glyph rects that has a shape that does
not
match the glyphs in cases such as this.
The value 0 is NSNullGlyph. The text system will occasionally insert
null glyphs into the glyph stream, typically in the case of ligatures,
where there are fewer glyphs than characters. The layout manager's
methods for converting from character range to glyph range and vice
versa will let you know what is going on.
Douglas Davidson
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.