Re: advancementForGlyph problem
Re: advancementForGlyph problem
- Subject: Re: advancementForGlyph problem
- From: "David F." <email@hidden>
- Date: Wed, 28 Apr 2010 21:40:32 -0600
On Apr 28, 2010, at 7:33 PM, Graham Cox wrote:
>
> On 29/04/2010, at 4:49 AM, David F. wrote:
>
>> Any ideas on what I am doing/understanding wrong?
>
> I think that when glyphs are rendered on screen they are tweaked so as to take advantage of sub-pixel rendering and so on. That means that what you see is not exactly the same as the font values suggest.
Graham -- Thanks for replying. I'm obviously not the expert here, but what I am seeing doesn't look like an artifact of sub-pixel rendering. All of the bounds information for the glyph seems to be fine. It is the advancement that looks off.
Part of the problem is that I'm not seeing any documentation that talks about how strikethroughs and underlines are drawn. I would expect them to be drawn such that their widths match the advancement. (That would allow you to draw glyphs one at a time and be confident that there wouldn't be any gaps in the underline/strikethrough.)
Instead, what I am seeing is that underlines and strikethroughs are being drawn shorter than the advancement. And, as I mentioned in my original email, it looks to me like the cursor position (which should also match the advancement) is moving in line with the shorter strikethroughs/underlines and not adhering to the value returned by advancementForGlyph.
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