14
0
mirror of https://github.com/belluzj/fantasque-sans.git synced 2024-12-22 23:41:30 +01:00

Update validate-generate script to support python3

This commit is contained in:
vyp 2015-04-05 14:48:13 +10:00
parent b424798f18
commit 58c3c715bf

View File

@ -16,11 +16,19 @@ import fontforge;
font = fontforge.open("Sources/${basename}.sfd"); font = fontforge.open("Sources/${basename}.sfd");
# Extract interesting informations # Extract interesting informations
print font.fontname $(if [[ "$(python --version 2>&1 | cut -d' ' -f2- | cut -c1)" == "3" ]]; then
print font.familyname echo 'print(font.fontname)'
print font.fullname echo 'print(font.familyname)'
print font.os2_weight echo 'print(font.fullname)'
print font.italicangle echo 'print(font.os2_weight)'
echo 'print(font.italicangle)'
else
echo 'print font.fontname'
echo 'print font.familyname'
echo 'print font.fullname'
echo 'print font.os2_weight'
echo 'print font.italicangle'
fi)
bitmask = font.validate(); bitmask = font.validate();
if bitmask != 0: if bitmask != 0: