PlatformIO package of the Teensy core framework compatible with GCC 10 & C++20
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

39 líneas
1.2KB

  1. #!/bin/bash
  2. # Ugly little Bash script, generates a set of .h files for GFX using
  3. # GNU FreeFont sources. There are three fonts: 'Mono' (Courier-like),
  4. # 'Sans' (Helvetica-like) and 'Serif' (Times-like); four styles: regular,
  5. # bold, oblique or italic, and bold+oblique or bold+italic; and four
  6. # sizes: 9, 12, 18 and 24 point. No real error checking or anything,
  7. # this just powers through all the combinations, calling the fontconvert
  8. # utility and redirecting the output to a .h file for each combo.
  9. # Adafruit_GFX repository does not include the source outline fonts
  10. # (huge zipfile, different license) but they're easily acquired:
  11. # http://savannah.gnu.org/projects/freefont/
  12. convert=./fontconvert
  13. inpath=~/Desktop/freefont/
  14. outpath=../Fonts/
  15. fonts=(FreeMono FreeSans FreeSerif)
  16. styles=("" Bold Italic BoldItalic Oblique BoldOblique)
  17. sizes=(9 12 18 24)
  18. for f in ${fonts[*]}
  19. do
  20. for index in ${!styles[*]}
  21. do
  22. st=${styles[$index]}
  23. for si in ${sizes[*]}
  24. do
  25. infile=$inpath$f$st".ttf"
  26. if [ -f $infile ] # Does source combination exist?
  27. then
  28. outfile=$outpath$f$st$si"pt7b.h"
  29. # printf "%s %s %s > %s\n" $convert $infile $si $outfile
  30. $convert $infile $si > $outfile
  31. fi
  32. done
  33. done
  34. done