macos:Fonts

出自UXGuide.net

跳转到: 导航, 搜索

请帮助我们修订和更新本文的中文部分

本文的中文部分虽然取自官方最新中文版本,但与英文原版相比已落后了一年多,可能无法反映英文版本中最近的修改,且文中笔误、前后译法矛盾、未翻译完全的片断较多,请您帮助一起修订完善。详情参见中文版修订完善计划

字体
Fonts

If your program supports typography and text layout using user-selectable fonts, you should use the Fonts window to obtain the user’s font selection. Users can select fonts and sizes in both the standard (Figure 6-5) and the minimized (Figure 6-6) view of the Fonts window. In the standard view, there are also controls for fine-tuning the display characteristics of fonts. Most important, the Fonts window is implemented for you. You do not have to create a Fonts menu or other special user interface to display and gather font information from the user.

如果您的程序支持使用用户选择的字体来打印和布局,您应该使用标准的字体窗口来获得用户选择的字体。在字体窗口的标准视图和小型视图中用户都可以选择字体和大小(图6-5)。在标准视图中,还有一些优化字体显示的控件。最重要的,字体窗口是已经为您实现好了的。您没必要创建一个字体菜单或者其他特定的用户接口来显示和收集字体信息。

Figure 6-5 Fonts window
图 6-5 字体窗口

mt_fontpanel.jpg

Figure 6-6 Minimal Fonts window
图 6-6 小型字体窗口

mt_fontpanel_small.jpg

The Fonts window also provides advanced typography controls for fonts that support those options. The user can open a Typography inspector by choosing Typography from the action menu. Figure 6-7 shows the typography controls for the Zapfino font.

标准字体窗口同样提供了设置字体排版效果的控件。用户可以从操作菜单中选择版面来打开字体排版查看器。图6-7显示了Zapfinfo字体的排版效果控件。

Figure 6-7 Typography inspector 图 6-7 字体排版查看器

mt_typographyoptions.jpg

For more information about font selection and management in Cocoa applications, see Font Panel; for Carbon applications, see Apple Type Services for Fonts Programming Guide.

关于Cocoa程序中字体选择和管理的更多信息,请参考字体面板;Carbon程序请参考Apple字体服务编程指南

个人工具
名字空间
变换
动作
导航
工具箱