A little more investigation:

On 2010-12-10, at 2:39 PM, Phillip Mills wrote:

> I've been having one of those "I must be doing something stupid" days.

[...]

> 2010-12-10 14:19:03.936 FontTest[1834:207] .1234567890123456789012. size: 
> 317.000000
> 2010-12-10 14:19:03.937 FontTest[1834:207] .                      . size: 
> 308.000000
> 2010-12-10 14:19:03.938 FontTest[1834:207] ........................ size: 
> 317.000000
> 2010-12-10 14:19:03.938 FontTest[1834:207] .12345678901234567890123. size: 
> 332.000000
> 2010-12-10 14:19:03.939 FontTest[1834:207] .                       . size: 
> 322.000000

Well, as some kind of consolation I've discovered that similar code (using 
NSString sizeWithAttributes:) and the same font name gives equal widths for 
digits or spaces on the Mac SDK.

The other thing I notice is that the iOS-generated width divided by the number 
of characters is exactly 14 for spaces, but is something close to 14.4 for all 
other tests.  This makes me wonder whether something is being truncated or 
converted at the wrong point within the size 
calculation._______________________________________________

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