regression_test.sh 989 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #!/bin/sh
  2. # Regression test generated fonts against last tagged release
  3. set -e
  4. mkdir -p prev_release
  5. OLD_FONT=prev_release/Roboto\[ital\,wdth\,wght\].ttf
  6. GENNED_FONT=fonts/hinted/Roboto\[ital\,wdth\,wght\].ttf
  7. curl -s https://api.github.com/repos/googlefonts/roboto-classic/releases/latest \
  8. | grep "https://github.com/googlefonts/roboto-classic/releases/download/*" \
  9. | cut -d ":" -f 2,3 \
  10. | tr -d \"\, \
  11. | wget -i -
  12. unzip -po Roboto_*.zip "hinted/Roboto\[ital\,wdth\,wght\].ttf" > $OLD_FONT
  13. # Diff old hinted variable font against current
  14. diff ()
  15. {
  16. diffenator $OLD_FONT $GENNED_FONT -i "$2" \
  17. -html > $1/index.html \
  18. -rd -r ./img/ \
  19. --ft-hinting normal
  20. mv img/ $1
  21. }
  22. mkdir -p diffs \
  23. diffs/Regular \
  24. diffs/Condensed \
  25. diffs/Italic \
  26. diffs/CondensedItalic
  27. diff diffs/Regular "wght=400, wdth=100"
  28. diff diffs/Condensed "wght=400, wdth=75"
  29. diff diffs/Italic "ital=1, wght=400, wdth=100"
  30. diff diffs/CondensedItalic "ital=1, wght=400, wdth=75"