baseline alignment of NSTextAttachment doesn't seem to always align...?
baseline alignment of NSTextAttachment doesn't seem to always align...?
- Subject: baseline alignment of NSTextAttachment doesn't seem to always align...?
- From: Michael Link <email@hidden>
- Date: Wed, 19 Apr 2006 12:00:08 -0500
I'm rendering an attributed string in the drawRect: method of an
NSTextAttachmentCell (the title for the button). I determine the
baseline offset by creating a text container, text storage and layout
manager and setting the text storage to an attributed string of the
button title and the adjacent text to the button and then asking the
layout managers typesetter for the baseline offset.
I seem to get the right baseline offset once in awhile. For example...
boldSystemFontOfSize:11 userFontOfSize:11
----------------------- -----------------
genre Rock <- baseline is aligned
genre rock <- baseline is not-aligned
'genre' is the rendered text of the text attachment and 'rock' and
'Rock' are just text. Is there a different calculation that needs to
be done to get the text attachment's rendered title to align
correctly with the rest of the text on the line? Thanks.
--
Michael
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden