你是正确的,因为Mac OS X有大量的字体。这些字体通过四个或更多文件夹分发,具体取决于软件安装和计算机上用户帐户的数量。
+1你的问题,因为我一直在做同样的事情,所以我编写了一个小脚本来完成这项工作。它从四个/五个不同位置提取字体,写入文本文档,然后更改字体。但是,当你运行它时,你的系统可能会开始滞后(就像我之前做的那样)。但滞后是值得的!下面是该脚本:
--"get all the fonts on the system"
display dialog "WARNING" & return & return & "This script may cause your computer to lag. Are you sure you want to proceed with the font sampler?" with icon caution
set the font_folders to {"/Users/" & the short user name of (system info) & "/Library/Fonts/", "/Library/Fonts/", "/Network/Library/Fonts/", "/System/Library/Fonts/", "/System Folder/Fonts/"}
set these_fonts to {}
repeat with this_font_folder in the font_folders
try
tell application "Finder" to set the end of these_fonts to every item of ((this_font_folder as POSIX file) as alias)
end try
end repeat
--"write a bunch of stuff in a text document"
tell application "TextEdit"
activate
set zoomed of the front window to true
set the name of the front window to "Font Sampler"
end tell
repeat with this_font in these_fonts
tell application "Finder" to set this_font to the name of this_font
tell application "TextEdit" to set the text of document 1 to the text of document 1 & this_font & ": The quick brown fox jumps over the lazy dog." & return
end repeat
--"set the font of each consecutive line to the next font (i.e. Line 1's font is Font 1, Line 2's font is Font 2, etc.)"
repeat with i from 1 to the count of these_fonts
tell application "Finder" to set this_font to the name of item i of these_fonts
tell application "TextEdit" to tell paragraph i of the text of document 1 to set the font to this_font
end repeat
+1因为看起来令人惊讶,直到现在我还没有听说过'Font Book'! :P – fireshadow52
这应该被标记为正确答案! –