- Table of Contents
- Copyright
- About the Author
- Acknowledgments
- Tell Us What You Think!
- Introduction
- Part I: Introduction to Mac OS X
- Chapter 1. Mac OS X Component Architecture
- Chapter 2. Installing Mac OS X
- Chapter 3. Mac OS X Basics
- Chapter 4. The Finder: Working with Files and Applications
- Chapter 5. Running Classic Mac OS Applications
- Part II: Inside Mac OS X
- Chapter 6. Native Utilities and Applications
- Chapter 7. Internet Communications
- Chapter 8. Installing Third-Party Applications
- Part III: User-Level OS X Configuration
- Chapter 9. Network Setup
- Chapter 10. Printer and Font Management
- Print Center
- Printing
- Managing Fonts
- Font Web Sites
- Summary
- Chapter 11. Additional System Components
- Part IV: Introduction to BSD Applications
- Chapter 12. Introducing the BSD Subsystem
- Chapter 13. Common Unix Shell Commands: File Operations
- Part V: Advanced Command-Line Concepts
- Chapter 14. Advanced Shell Concepts and Commands
- Chapter 15. Command-Line Applications and Application Suites
- Chapter 16. Command-Line Software Installation
- Chapter 17. Troubleshooting Software Installs, and Compiling and Debugging Manually
- Chapter 18. Advanced Unix Shell Use: Configuration and Programming (Shell Scripting)
- Part VI: Server/Network Administration
- Chapter 19. X Window System Applications
- Chapter 20. Command-Line Configuration and Administration
- Chapter 21. AppleScript
- Chapter 22. Perl Scripting and SQL Connectivity
- Chapter 23. File and Resource Sharing with NetInfo
- Chapter 24. User Management and Machine Clustering
- Chapter 25. FTP Serving
- Chapter 26. Remote Access and Administration
- Chapter 27. Web Serving
- Part VII: Server Health
- Chapter 28. Web Programming
- Chapter 29. Creating a Mail Server
- Chapter 30. Accessing and Serving a Windows Network
- Chapter 31. Server Security and Advanced Network Configuration
- Chapter 32. System Maintenance
- Appendix A. Command-Line Reference
- Appendix B. Administration Reference
Managing Fonts
OS X has introduced a new type of font suitcase with the extension .dfont. The new font suitcase stores a file's resource fork in the data fork. In addition to the new font format, OS X supports these Windows font formats: TrueType fonts with extension .ttf, TrueType collections with extension .ttc, and OpenType fonts with extension .otf. OS X supports PostScript Type 1, legacy bitmap fonts, and Unicode. Unicode is a universal character-encoding standard for multilingual text support across multiple platforms. Supporting Unicode enhances OS X's multilingual support. OS X's multilingual support is most clearly seen in the available keyboards in the International pane. At this point, though, you might wonder if your old collection of fonts will work in OS X. Fortunately, OS X also supports older font suitcases used in earlier versions of the operating system without any conversion.
Installing a New Font
Installing a new font on your system is not difficult. For example, to install the Pushkin handwriting font from the ParaType free fonts page (http://www.paratype.com/shop/), download the following file to your drive:
http://www.fontstock.com/softdl/PushkinTT.zip
This is actually a Windows TrueType font, but as we know, OS X conveniently understands these, as well as many traditional Mac OS font types. You can uncompress it at the command line by using
unzip PushkinTT.zip Archive: PushkinTT.zip inflating: Pushkin.ttf
The first line shown here is the command you type. The next two lines are lines of output that the command produces as it unzips the file. Of course, you can also uncompress it in the GUI interface, as you are used to doing in Mac OS.
If you want this font to be available to all users on your machine, our recommended configuration, copy it either to the /Library/Fonts/ or /System/Library/Fonts directories, but not both. The /System directories are usually reserved for Apple's usage, but will work if you want to place fonts in a protected area. If you want the Font to be available for your use only, copy it to your ~/Library/Fonts/ directory. If you want to use the command line to copy the file, use the following syntax:
cp Pushkin.ttf /Library/Fonts/
That's it. You'll need to restart any applications that you want to be able to use the font, but you shouldn't need to restart your machine, or even log out. Figure 10.14 shows what the terminal looks like in the Pushkin handwriting font.
Figure 10.14 Here is a terminal window set to use the Pushkin handwriting font. Although this is an amusing change for a terminal, it is perhaps not the best font choice for regular terminal usage.
Macintosh suitcases and PostScript fonts need to be copied into the /System/Library/Fonts/ or /Library/Fonts/ directory by dragging and dropping from the Finder because they are resource fork–type fonts, and don't always copy cleanly from the command line.
Using the Font Panel
You can access your fonts in the Font panel, which is available in many of the typical OS X applications. The location of the Font panel varies with the application. For example, some applications include Font as a menu bar item, and you select Font panel under that. Other applications include the Font panel as an option, although it might be a nested option, under another menu bar category, such as Format. The Font panel has divisions for Collections, Family, Typeface, and Sizes. Because the default collection is All Fonts, you can indeed see your entire collection of available fonts with ease. However, the Font panel also provides the capability for you to group your fonts together. It comes with some groups already created. You can modify those collections as well as create, modify, and remove your own collections. The Font panel is shown in Figure 10.15.
Figure 10.15 The Font panel is your interface to using and managing your fonts.
To switch between collections, just click the desired collection in the Collections column. Although this is rather obvious, it is not as obvious if you do not see the Collections column. If your view of the Font panel starts with the Family column, widen the panel by dragging it at the bottom right.
The Edit Collections option, which is available under the Extras option of the Font panel, is the option you use if you want to modify the collections. Figure 10.16 shows what the panel looks like when you are in the mode for editing collections. When the Font - Collections window appears, name your new collection. To add a font to the collection, select a font in the All Families column, and then click the << button. To remove a font from the collection, select the font in the Family column, and then click the >> button. The options at the bottom left, +, –, and Rename, control the collections. Keep in mind that – removes a collection. If you plan to remove a collection, make sure that you are selecting the right collection to be deleted. When you are finished editing your collections, click Done. Your edits are now available in the Font panel of any application that uses the Font panel.
Figure 10.16 The Font – Collections window, which appears when you select Edit Collections under the Extras section in the Font panel, is where you edit your font collections.
The Add to Favorites option under the Extras menu enables you to add fonts directly to the Favorites collection. It opens a window that enables you to delete fonts from your Favorites collection.
The Edit Sizes option under the Extras section of the Font panel enables you to choose whether you would like to see font sizes listed as fixed sizes or on a slider instead. It also enables you to edit the available sizes. For a fixed view, you can add or delete a specific size from the fixed list. For a sliding scale, you can edit the minimum and maximum font sizes. Figure 10.17 shows the Font - Sizes window that first appears for editing sizes. It changes slightly to enable you to adjust the minimum and maximum available font sizes on the slider.
Figure 10.17 The Font – Sizes window, which appears when you select Edit Sizes under the Extras section in the Font panel, is where you select how the font sizes options will be displayed.
The default slider sizes are from 8-point to 72-point. Figure 10.18 shows the Font panel with the slider in the Sizes column. Selecting the Adjustable Slider option, shown in Figure 10.17, accesses this version of the panel, rather than the default fixed listing.
Figure 10.18 Here the Font panel is shown with the slider for indicating size.
The Color option under the Extras section opens a standard color browser where you can specify, by a wheel, spectrum, color scales, and so on, a color for the font you are using. Just click Apply after you have selected the color you want.
The Extras section also has a Get Fonts option that takes you to http://www.apple.com/fonts/buy/, which is a site where Apple is planning to sell more fonts for OS X.
If you have some preferred settings in the Font panel, you can shrink its size so that it shows your preferred defaults in a pop-up menu, as shown in Figure 10.19. This enables you to conveniently leave the Font panel showing while you are working, rather than having to minimize it. If you prefer, the Font panel can be minimized. When you quit the application associated with a particular Font panel, that Font panel also quits.
Figure 10.19 Here the Font panel has been shrunk so that the options are included in pop-up menus instead.
As for actually using a font in your application, select the font you want to use from the Font panel and start typing. If the font switches to a font other than what you selected, select the text you just typed, and select the desired font again. The font will switch to what you want, and you can continue typing. If you want to see what different fonts look like, you can type something, select it, and then select a font for it. Continue selecting a font until you have seen the ones you wanted to see. If you would like to see the Font panel in action, check the QuickTime movie at http://www.apple.com/macosx/theater/fontpanel.html.
Using the Keyboard Menu and Alternative Input Scripts
Apple has, for several generations of Mac OS, made a very clever feature available as an optional part of the operating system. This software, WorldScript and the various language kits it supported, was a way of putting a layer of abstraction between what you type on the keyboard, and what is actually entered into a document that you are working with. The system was modeled on the notion that a computer might have only one physical keyboard, but a knowledge of the language and locale in which the user is working would enable a translation between what keys are physically pressed and contextually correct data output. This functionality is now a default part of OS X, and is embodied in a two-part system comprised of key-mapping tables called keyboards, and locale-sensitive processing software known as input scripts.
Keyboard mapping tables are used to map between a particular key that is pressed, and an output symbol that is generated. For example, you might have heard of the Dvorak keyboard, a more efficient alternative to the QWERTY keyboard that you are probably already familiar with. A keyboard mapping might be used to re-map the keys on your QWERTY keyboard, so that they function as though your keyboard was a Dvorak keyboard instead. A keyboard mapping can also be used to do things such as change the currency indicator to the appropriate currency for the locale—British pounds for U.K. English and American dollars for American English, for example.
Input scripts, on the other hand, can perform more sophisticated, context-sensitive alterations of data as it is entered. This modification can be anything from changing the font used to display all or certain characters, to providing phonetic ways of entering symbols that are not directly available from the keyboard.
These two pieces of functionality, accessed jointly though the Keyboard menu and the International pane of the system controls, give you the ability to enter data in character sets appropriate for other languages, whether they are English-like languages or languages with completely different symbol sets and entry needs.
The use and utility of this is probably not immediately apparent from just a description, but working through the following example should give you an idea of just how powerful the keyboard tables and input scripts can be.
The first place to examine when configuring or customizing your input environment is the International pane. Figure 10.20 shows the Languages tab of the International pane. In the bottom portion, there is an option to select the default behavior of scripts. The fine print in the tab tells us that what we select here affects sort order, case conversion, and word definitions. From the perspective of a user with an American English keyboard, nothing obvious happens, even if I switch to one of the other choices in the Roman script. This is because the Roman script is used for Roman-like language input styles. Most European languages use an alphabet, character ordering, and display styles that have significant similarities. The number of characters is roughly the same, text flows from left to right on the page, there are uppercase and lowercase letters, and so on. On the other hand, languages such as Arabic, Hebrew, Chinese, and Japanese have very different symbol sets, character ordering, and display styles that are unlike each other and the majority of European languages. By convention, therefore, languages with Roman-like characteristics use the Roman input script.
Figure 10.20 The Language tab of the International panel is where you select a default script.
Other languages might use their own particular input scripts, which can provide language-specific input functionality, or they might use the Unicode input script. Unicode is an internationally standardized way of providing input in a number of symbol sets that cannot be conveniently represented on a standard keyboard. The Unicode input script cannot provide customized input processing in a language-contextual manner, but does provide for a standardized way to input a great number of characters from a keyboard with only a limited number of keys. To use Unicode, therefore, you need to have a mapping between keyboard sequences and output symbols. As a demonstration of the power available in other input scripts, we'll take a look at the Japanese input script, and how it maps from phonetic keyboard input in romanji, into natural Japanese Katakana, Hiragana, and Kanji.
When looking through the International panel's Language tab, browse the choices under Roman and Japanese. You will note that Roman has many choices, whereas Japanese has only Japanese. Now pick an appropriate default for yourself. Please note that the available selection on your machine might differ from what is shown here.
Figure 10.21 shows the more interesting tab for our purposes, the Keyboard Menu tab. The Keyboard Menu tab enables you to pick various types of keyboard layouts. Browse through the keyboard layout options in this section. Note that there are several in the Roman script, a few that use the Unicode script, and one in the Japanese script. Select a few that use the Roman script, and select the Japanese layout.
Figure 10.21 You can select any keyboard layouts that might be of interest to you in the Keyboard Menu tab of the International panel.
When you select more than one keyboard, a flag icon of the country you've chosen appears in the menu bar of the Finder, as shown in Figure 10.22. This is the Keyboard menu, which shows which keyboard layouts are available, and which is chosen. The Customize Menu option takes you to the Keyboard Menu tab of the International pane. The most obvious way to switch between keyboard layouts is to select the one you want from the Keyboard menu itself. However, if you check the Options section of the Keyboard Menu tab of the International pane, you will see that you can also use Command+Option+Space to rotate to the next keyboard in the active script. In other words, if you are in a keyboard that uses the Roman script interface, the key combination rotates to the next Roman keyboard in your menu. You can use Command+Space to rotate to the default keyboard of the next script.
Figure 10.22 This is the Keyboard menu that appears in the Finder when you have selected more than one keyboard layout under the Keyboard Menu tab of the International pane.
Take a couple moments to play with the Roman script keyboard layouts in an application such as TextEdit. A simple example to check is the British keyboard. If you switch to it and type #, you will discover that you get £. Switch to the French keyboard and start pressing the number keys. You get many characters with accents instead. Press a number key while holding down the Shift key to get a number instead.
Hopefully, you have gotten used to the idea of the script interpreting your input as appropriate for the keyboard layout you have selected. Although these modifications of your input might seem relatively simple, this is because you've been working in your already-familiar Roman input script.
Now, let's take a look at a more interesting keyboard layout and input script—the one for Japanese. As you go through the example, notice where the input script is interpreting the input that you type, and attempting to produce contextually correct output for you. Apple has traditionally produced language kits for a large number of non-Roman script languages, and this is exactly the sort of input functionality and conversion that you should expect in any of these languages that you might need to work in.
Figure 10.23 shows a Japanese phrase. For those who don't read Japanese, the pronunciation is (as close as we can represent in English) Kazenotaninonavshika, which translates as "Nausicaä of the Valley of the Wind," the title of a popular Japanese children's film.
Figure 10.23 The Japanese phrase Kaze no tani no Nausicaä, will serve as our example of using the input system.
Without the functionality available in the language kit, typesetting this phrase from the keyboard would be very difficult. It contains characters from three different Japanese alphabets—one of which contains thousands of characters. Entering this without a language kit would entail finding the right keys to produce the characters from the two small phonetic alphabets, all the while switching between fonts and picking from a huge list of characters in the thousand-plus character alphabet. With the Japanese kit, typesetting this is only a little more complex than typing the word as it is pronounced in English.
Using TextEdit and the Japanese language kit, we can easily reproduce the text shown in Figure 10.23. Although this example is in Japanese, the same steps can be used for any language you use. From within the application that you want to use an alternative input script, choose the keyboard layout from the keyboard menu. The input script for that keyboard will take over the input for the application.
Figure 10.24 shows how TextEdit looks while running under the influence of an input script. A new menu created by the Japanese input script, and containing functions pertinent to operations in the language, has appeared. The menu for the Japanese input script is, of course, in Japanese. Other input scripts will provide their own menus with similar functionality, presented in a language appropriate for their intended users.
Figure 10.24 After you have switched to the Japanese keyboard, another menu item appears to the right of the symbol for the Japanese keyboard. This menu is in Japanese.
The Operation Palette that has appeared lower on the screen, is helpful for working with the Japanese keyboard layout. If you lose it, it is the second item in that Japanese menu shown in Figure 10.24.
The Operations Palette, which might vary depending on the language kit you are using, indicates and sets the current input method via the top row of buttons. The first button selects hiragana phonetic input, the second selects the katakana-input method, and the third and fourth enable entry in kanji and other character systems via Unicode, and entry in our normal Latin alphabet, respectively. The button with the green rectangular icon gives you an interface, in the appropriate language, to some features of the operating system. Additionally, the question mark opens the language-specific Help system. If the language kit you want to use requires complex interaction with a number of alphabetic systems, you can expect that you will be provided with similar functionality under OS X.
Now, to reproduce the Japanese phrase seen earlier, all we need is to make sure that the Operations Palette is phonetic mode, and that we know how to say (phonetically) what we want to type.
For the sample phrase, the characters we are looking for break up, partly as words, and partly as phonetics (words for the pictogram-based parts of the phrase, and phonetics for the phonetic character parts), as follows
kaze no tani no na u shi ka
In the Font panel, pick a fairly large size for the font so that you can easily read what you are typing. Then type the letter k. So far, nothing unexpected happens. Type the letter a. As soon as you type this, the input script recognizes that you have entered a phoneme, and replaces it with the appropriate phonetic character for the selected alphabet. The character for the sound ka has appeared, and replaced the k and a characters. Type the letter z. Now you have a hiragana character and the letter z, as shown in Figure 10.25. Now type the letter e. Again, the input script recognizes a phoneme. The character for the ze sound has appeared. Note the characters have an underscore. This means that the input script recognizes that there are other possible representations in the language that could also be appropriate, and is prompting that we might want to change the current representation.
Figure 10.25 The Japanese character for ka followed by the letter z are showing after typing ka, and then z. The underscore means that we have not picked any final representations yet.
To select from possible representations that the input can take, press the spacebar. The input system will select a character for you. If the character is not correct, press the space bar again. This opens a little window, as shown in Figure 10.26, from which you can manually select a character.
Figure 10.26 Press the space bar twice to get a menu that enables us to choose another character.
If the scrolling list of alternative representations doesn't provide what you're looking for, you can also bring up the Character Palette. In the Japanese language kit, this is accessed from the left-most button on the second row of the Operations Palette. The Character Palette provides a large selection of kanji characters, and is shown in Figure 10.27.
Figure 10.27 The Character Palette provides a large selection of characters to choose from.
To select an item from the Character Palette, select the desired character in the grid. When it appears as the character in the large square, drag it to your text. The Character Palette, also available as the third menu item in the Japanese menu, has more than just kanji items, so you might be interested in playing with it more at a later date. These currently include Cyrillic, Greek, and a number of pictorial symbols such as boxes and lines.
Continue through the rest of the phrase, picking and choosing characters as you go. The final part of the title we're working on, Nausicaä is written in the other Japanese phonetic alphabet, katakana. To work in this character system, select the katakana symbol (second from the left in the top row) from the Operation Palette. Now type na and press Enter. Next, type u and press Enter. Then type shi and press Enter. Finally, type ka and press Enter. Pressing Enter after each indicates to the input script that you're done entering a phonetic equivalent, and that you want to accept the symbol that it has chosen.
Now you have finished typing the title. What you have typed should match what is shown in Figure 10.28.
Figure 10.28 Now we have successfully converted kazenotaninonaushika into correctly written Japanese.
This particular title was a convenient example for you to try because it uses characters from all three Japanese alphabets, giving you the opportunity to see examples of each of the input script methods, and the way they interact. Even if you're interested in working in a different language kit, we hope you find this information useful—if you understand the functionality we've presented here, you should be able to find similar functions in the language kit of your choice.
Finally, Figure 10.29 shows just a small sampling of the types of characters available in the Character Palette, with some of these entered into the TextEdit application. This palette provides you with a significant resource for picking and choosing characters appropriate to different languages, even if you don't know how to pronounce the symbol phonetically.
Figure 10.29 The Character Palette under the Japanese menu of the Japanese keyboard provides many additional characters.
Hopefully, this section has provided a fun way to learn about the available keyboard inputs offered in OS X, particularly the most complex of those installed on our system, Japanese. After you have selected multiple keyboards, a Keyboard menu appears in the menu bar. You can easily select a desired keyboard by selecting it from the Keyboard menu. For keyboards that belong to the Roman script input, the changes in the behavior of your keyboard might be subtle. With the Japanese script input keyboard, however, the input method is far more interactive than the Roman script input keyboards. Other input scripts and keyboards will undoubtedly be available in the future, and you will be able to use the techniques outlined here to work in any that you need.
Font Web Sites | Next Section

Account Sign In
View your cart