Re: Interpreting -underlinePosition and -underlineThickness
Re: Interpreting -underlinePosition and -underlineThickness
- Subject: Re: Interpreting -underlinePosition and -underlineThickness
- From: Benjamin Stiglitz <email@hidden>
- Date: Thu, 14 May 2009 11:59:14 -0400
- Mail-followup-to: email@hidden
> How should NSFont's -underlinePosition and -underlineThickness values be
> interpreted? Are they fixed values, indicating an absolute offset, or are
> they some proportion of the pointSize or something else?
In the optimal case (I’ll explain shortly), the underlinePosition is the
number of points below the baseline to position the center of the line
with width underlineThickness.
However (and this is a big however), many fonts report an invalid
underline thickness and/or position. In this case, both the Cocoa and
CoreText rendering paths cook up values based on the average of the
metrics of Helvetica and Times, scaled to fit the metrics of the
selected font. (Please do file a bug for API to access these computed
values.)
> I ask because the results I'm getting by treating it as an absolute
> value differ from Apple's rendition, but the docs are unenlightening on
> this point.
An image with a comparison would go a long way to helping us diagnose
this issue.
-Ben
_______________________________________________
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