Managing Fonts

In the “The Control Layer: Text Layout and Containers” section of this chapter, it was stated that glyphs are managed by font objects. Each font can be thought of as a collection of glyphs. Each glyph depicts a character in a particular character set. Character sets are described in the “NSCharacterSet” section of Chapter 7. Character sets describe groups of Unicode characters. Because no font can contain glyphs for every possible Unicode character, a complex relationship between character sets, Unicode characters, and fonts is needed. The complexity is encapsulated within the NSLayoutManager class that is responsible for laying out glyphs corresponding to the characters and attributes in attributed strings.

Cocoa’s text system ...

Get Cocoa® Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.