January Meeting

3 views
Skip to first unread message

Art Gillespie

unread,
Jan 24, 2012, 10:09:38 AM1/24/12
to tucson-cocoaheads
Hi All,

Hope everyone enjoyed the holiday season and that your new year is off
to a good start.

The first TUS Cocoaheads of 2012 is next Tuesday at Spoke 6 at 7 p.m.
I'll be presenting on "Typography in iOS" — an in-depth review of
different options for displaying text in iOS user interfaces.

Look forward to seeing you all there!

Best,

Art

Sixten Otto

unread,
Feb 1, 2012, 12:12:49 AM2/1/12
to tucson-cocoaheads
For what it's worth, along with running Art's sample code, you can
also see the list of iOS preinstalled fonts at http://iosfonts.com/.
(Frankly, I find many of their choices puzzling at best. Maybe
explained by attempting parity with desktop OS X.)

The Windows Phone system font is Segoe WP. According to Wikipedia, the
pronunciation is "SEEgo".

It's also worth noting that you need to be VERY aware of the license
terms associated with a particular font when embedding it. Even many
freely available faces (like the excellent Museo) do not allow
embedding in an application. And while webfont licensing is finally
becoming sane(ish), this is still mostly untrodden ground.

Sixten

Sixten Otto

unread,
Feb 1, 2012, 12:29:00 AM2/1/12
to tucson-cocoaheads
Oh, also, if you DO want to dip into NSAttributedString, here's the
list of Core Text attributes available on iOS:
http://developer.apple.com/library/ios/#documentation/Carbon/Reference/CoreText_StringAttributes_Ref/Reference/reference.html

As noted, the font attribute requires a CTFontRef, and NOT a UIFont.
You should, however, be able to do this (except when you can't):
UIFont* uiFont = ... ;
CTFontRef ctFont = CTFontCreateWithName(uiFont.fontName,
uiFont.pointSize, NULL);

But, like Art suggested, that's just the tip of the iceberg of pain
that is Core Text. :-)
Reply all
Reply to author
Forward
0 new messages