Having never worked with fonts at that level, nor seen these APIs  
before, my guess may be completely off the wall. You are forewarned ;)

I noticed that the 'bounds x' you supply is a negative value. If you  
add the 'advance w' to the 'bounds x' value, you get approx 23.4,  
which is pretty close to the estimated size you're expecting. Perhaps  
this negative value implies that the drawing of this glyph is actually  
to start from *slightly* in the previous character's area?

Total guess, feel free to ignore etc etc ;)

Chris Backas


On Apr 28, 2010, at 2:49 PM, David F. wrote:

> The information I am getting back from advancementForGlyph doesn't  
> seem to be correct.  Here are the glyph bounds and advancement for  
> the capital letter 'A' in Georgia 36pt:
>
> == A ==
> bounds x: -0.720703
> bounds y: 0.000000
> bounds w: 25.699219
> bounds h: 25.294922
> advance w: 24.152344
> advance h: 0.000000
>
> The problem that I am seeing is that it looks like the advancement  
> should only be 23 (maybe ~23.2).  TextEdit appears to be using an  
> advancement of 23 and underlines and strikethroughs are being drawn  
> 23 pixels wide.
>
> Any ideas on what I am doing/understanding wrong?
>
> Thanks,
> David
>
> _______________________________________________
>
> 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/chb%40infoplusonline.com
>
> This email sent to c...@infoplusonline.com



CONFIDENTIALITY NOTICE: This email (and any related attachments) contains 
information from InfoPlus (a service of Bristol Capital, Inc.).  It is intended 
only for the addressee and may contain information that is confidential and/or 
otherwise exempt from disclosure under applicable law. If you are not the 
intended recipient or are acting as agent for the intended recipient, any use 
or disclosure of this communication is prohibited. If you have received this 
communication in error, please notify me immediately to arrange for the 
appropriate method of returning or disposing of the communication. If our 
respective Companies have confidentiality provisions in effect, this email and 
the materials contained herein are deemed CONFIDENTIAL and should be treated 
accordingly unless expressly provided otherwise.


_______________________________________________

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 arch...@mail-archive.com

Reply via email to