Tutorial: Easy Custom Fonts With Core Text
I’ve spoken a couple of times in the last week about Core Text in a tutorial, including an in-depth tutorial on manipulating text positioning in fancy text effects with core text, and in an article about an open source library wrapping Core Text functionality, and among other things allowing you to easily paginate and separate text into multiple columns. Core Text is a rather complicated library, and knowing how to use it is important, especially on the iPad where it appears many are developing apps with a reading component.
I found another tutorial which is a bit more accessible than the fancy text effects tutorial, designed to show you how to choose a custom font using Core Text. This tutorial shows you how to load in the font using Quartz, convert the font to a CTFontRef (a Core Text font reference), and how to use that font in a CATextLayer.
The tutorial is from Nathan Eror and can be found on his site here:
Custom Fonts On The iPad
The code has been added to Nathan’s CA360 Github project At:
Thanks for reading, please share this using the buttons below!
©2010 iPhone, iOS 4, iPad SDK Development Tutorial and Programming Tips. All Rights Reserved.
Share and Enjoy:
This entry was posted on Saturday, September 18th, 2010 at 12:32 am and is filed under I-phone. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site. You can skip to the end and leave a response. Pinging is currently not allowed.