3 # script file for FontForge for font italicization
4 # usage: fontforge -script italicize.pe angle *.sfd
5 # created files have suffix .oblique
8 Error("usage: angle sfds...")
10 angle = Strtol($argv[1])
16 SetItalicAngle(-angle)
17 # Panose changes are valid only for DejaVu fonts (I guess)
20 new_fontname = $fontname
21 j = Strstr(new_fontname, "-Roman")
23 new_fontname = Strsub(new_fontname, 0, j)
25 if (Strstr(new_fontname, "-") > -1)
26 new_fontname = new_fontname + "Oblique"
28 new_fontname = new_fontname + "-Oblique"
30 new_fullname = $fullname + " Oblique"
31 SetFontNames(new_fontname, "", new_fullname)
32 SetTTFName(1033, 3, new_fullname)
33 Save($argv[i] + ".oblique")