Re: advancementForGlyph problem
Re: advancementForGlyph problem
- Subject: Re: advancementForGlyph problem
- From: "David F." <email@hidden>
- Date: Thu, 29 Apr 2010 07:34:14 -0600
Chris - Thanks for replying. I too wondered if the advancement was being calculated from the glyph's origin instead of (0,0) but there are two strikes against that theory. 1) The docs clearly state that the advancement starts from (0,0) not the glyph's origin. 2) I'm seeing problems even with glyphs whose origin is to the right of (0,0).
David
On Apr 29, 2010, at 7:01 AM, Chris Backas wrote:
> 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 (email@hidden)
>>
>> 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:
>>
>> This email sent to email@hidden
>
>
>
> 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 (email@hidden)
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:
This email sent to email@hidden