Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

10. Working with Text > Recipe: Drawing Text onto Paths

Recipe: Drawing Text onto Paths

Sadly, Apple has not provided any API support whatsoever to allow you to draw text onto arbitrary paths such as UIBezierPath instances. That’s a shame, because it’s one of the most requested features for Core Text. Fortunately, Recipe 10-19 introduces a way to accomplish this. The method is passed an array of points representing the elements of a path. Recipe 10-19 draws text onto that path, making sure to preserve typographic integrity.

Figure 10-14 presents a gallery of drawing solutions that can be created with Recipe 10-19. Figure 10-14 (top left) shows drawing to a circle. Notice how the letters are laid out properly. Because wider characters take up more space, a sequence such as “wiw” would appear with typographic proportions, avoiding extra spaces on each side of the relatively thin “i” character.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial