• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: iOS: Monospaced fonts aren't?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: iOS: Monospaced fonts aren't?


  • Subject: Re: iOS: Monospaced fonts aren't?
  • From: Phillip Mills <email@hidden>
  • Date: Fri, 10 Dec 2010 15:26:10 -0500

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 (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

  • Prev by Date: Re: iOS: Monospaced fonts aren't?
  • Next by Date: Re: Implementing async notifications
  • Previous by thread: Re: iOS: Monospaced fonts aren't?
  • Next by thread: Implementing async notifications
  • Index(es):
    • Date
    • Thread