Ubuntu中将otf字体转换为ttf字体

1. sudo apt-get install fontforge
2. 创建 otf2ttf.sh 脚本
----------------------------
#!/usr/local/bin/fontforge
# Quick and dirty hack: converts a font to truetype (.ttf)
Print("Opening "+$1);
Open($1);
Print("Saving "+$1:r+".ttf");
Generate($1:r+".ttf");
Quit(0);
----------------------------
3.转换
fontforge -script otf2ttf.sh FONTNAME.otf
4.批量转换
for i in *.otf; do fontforge -script otf2ttf.sh $i; done

你可能感兴趣的:(Ubuntu中将otf字体转换为ttf字体)