40 lines
908 B
Plaintext
40 lines
908 B
Plaintext
#!/usr/bin/fontforge -lang=ff
|
|
#
|
|
# Removes the Kana glyphs from a font
|
|
|
|
hex = Array(16)
|
|
hex[0]="0"; hex[1]="1"; hex[2]="2"; hex[3]="3"
|
|
hex[4]="4"; hex[5]="5"; hex[6]="6"; hex[7]="7"
|
|
hex[8]="8"; hex[9]="9"; hex[10]="a"; hex[11]="b"
|
|
hex[12]="c"; hex[13]="d"; hex[14]="e"; hex[15]="f"
|
|
|
|
if ($argc > 1)
|
|
i = 1;
|
|
while ( i < $argc )
|
|
Open($argv[i])
|
|
|
|
row = 0
|
|
while (row <= 15)
|
|
column = 0;
|
|
while (column <= 15)
|
|
charname = "uni30" + hex[row] + hex [column]
|
|
if (InFont(charname))
|
|
Select(charname)
|
|
Print ("Clearing ", charname)
|
|
Clear()
|
|
endif
|
|
column++
|
|
endloop
|
|
row++
|
|
endloop
|
|
|
|
file = $fontname + ".sfd"
|
|
Print("Saving ",file)
|
|
Save(file)
|
|
Close()
|
|
i++
|
|
endloop
|
|
else
|
|
Print("Usage: $0 font.sfd [font.sfd ...]")
|
|
endif
|