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: