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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access