14
0
mirror of https://github.com/belluzj/fantasque-sans.git synced 2024-12-22 15:31:31 +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");
# Extract interesting informations
print font.fontname
print font.familyname
print font.fullname
print font.os2_weight
print font.italicangle
$(if [[ "$(python --version 2>&1 | cut -d' ' -f2- | cut -c1)" == "3" ]]; then
echo 'print(font.fontname)'
echo 'print(font.familyname)'
echo 'print(font.fullname)'
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();
if bitmask != 0: