In <clund-3735B5.11500009082003amstwist00.chello.com> C Lund wrote:Try NSLayoutManager's boundingRectForGlyphRange. m.> I'm trying to find a way to determine the width of a given glyph of a
> specified font. I assumed
> fontWidth[charIndex] = [[theFont boundingRectForGlyph:
> would give me the values I want, but that is not the case. While the
> values are in the right range, they are usually wrong. The above line
> gives values that are several pixels too large or small - and
> sometimes correct.
> Any suggestions?
matt neuburg, phd = [email]matttidbits.com[/email], [url]http://www.tidbits.com/matt[/url]
REALbasic: The Definitive Guide! 2nd edition!
Subscribe to TidBITS. It's free and smart.