I am writing a genealogy program that provides a variety of forms for entering data from many sources, eg, censuses, marriage registers. Instead of custom designing user input panels for each type of record, I am using a specification file that describes the fields and tool tips needed for each form and then use a custom layout manager to layout a specific user interface panel/dialog for each form on the the fly.

In writing this I have discovered that the font used in labels is LucidaGrande with a font size of 13. The value of labels is generally just an NSString which Aqua lays out in LucidaGrande/13.

For the layout manager I must calculate the lengths of all the labels to be used on a given form so I can lay them all out together using Apple UI guidelines. To find the sizes of the label text I create an NSAttributedString for each one with the correct font and font size and then ask for the length of this attributed string.

This all works and seems to be fine, but I have found something that bothers me a little bit.

As mentioned I have discovered that the font size in labels (when created directly from Interface Builder) is 13. However, when using the NSFont method +(CGFloat)labelFontSize the value returned is 10. Before I discovered that the font size used in labels was 13 I was using the labelFontSize when setting up the attributed strings, so things didn't work.

My question is. Why are labels rendered at 13 font when the NSFont method labelFontSize returns a value of 10? What deep dark secrets do I still have to learn?

Tom Wetmore
_______________________________________________

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