This is a Photoshop script that packages all fonts used in a PSD document into a compressed file. By using this script, users can quickly export all fonts used in a PSD document into a single compressed file, making it easier to use them on other devices or in other documents.
Open the PSD document to be processed.
Open the "Scripts" panel in Photoshop.
Select "File" -> "Scripts" -> "Browse" from the Photoshop menu bar, select this script file (PSD Font Packing.jsx) and click "Open".
Run the script.
In the script panel, select "PSD Font Packing" and click the "Run" button.
The program will automatically search for all fonts used in the currently open PSD document and save them in a compressed file.
View the results.
After completion, the program will generate a folder on the desktop that contains all font files used. At the same time, the program will also generate a compressed file on the desktop that contains all font files in the folder.
This script only works with Adobe Photoshop CC and above versions.
This script can only export the fonts used in PSD documents and cannot export other types of font files.
The compressed file generated by this script uses the ZIP format, so make sure a ZIP file extraction software is installed on the computer.
The font folder and compressed file generated by this script are saved on the desktop by default. You can modify the save path as needed.
This script may fail to copy font files due to being occupied. If this happens, manually copy the font files to the designated folder and compress the folder manually.
The script code is written in JavaScript and can be edited and debugged in Adobe ExtendScript Toolkit. The code mainly includes the following parts:
Find all fonts used in the document.
Create a target folder and copy all font files to the folder.
Create a compressed file and add the font folder to the compressed file.
Add a "Run" button on the script panel to make it easier for users to use the script.
这是一个用于将PSD文档中使用的所有字体打包成一个压缩文件的Photoshop脚本。通过使用该脚本,用户可以将PSD文档中使用的所有字体快速地导出为一个压缩文件,以方便在其他设备或其他文档中使用。
打开待处理的PSD文档。
打开Photoshop的“脚本”面板。
在Photoshop菜单栏中选择“文件” -> “脚本” -> “浏览”,选择本脚本文件(PSD字体打包.jsx)并点击“打开”。
运行脚本。
在脚本面板中选择“PSD字体打包”,点击“运行”按钮。
程序会自动搜索当前打开的PSD文档中使用的所有字体,并将它们保存在一个压缩文件中。
查看结果。
执行完毕后,程序会在桌面上生成一个文件夹,其中包含所有使用的字体文件。同时,程序还会在桌面上生成一个压缩文件,其中包含了该文件夹中的所有字体文件。
该脚本仅适用于Adobe Photoshop CC及以上版本。
该脚本仅能导出PSD文档中使用的字体,无法导出其他类型的字体文件。
该脚本生成的压缩文件使用ZIP格式,因此需要确保计算机上已经安装了ZIP文件解压缩软件。
该脚本生成的字体文件夹和压缩文件默认保存在桌面上,你可以根据需要修改保存路径。
该脚本可能会因为字体文件被占用等原因导致复制失败,如果出现这种情况,请手动将字体文件复制到指定文件夹中,并手动压缩该文件夹。
该脚本的代码使用JavaScript编写,可以在Adobe ExtendScript Toolkit中进行编辑和调试。代码主要包括以下几个部分:
查找文档中使用的所有字体。
创建一个目标文件夹,并将所有字体文件复制到该文件夹中。
创建一个压缩文件,并将字体文件夹添加到压缩文件中。
在脚本面板中添加一个“运行”按钮,以方便用户使用脚本。