fontcat-devtest-while 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #!/usr/bin/fish
  2. # #!/bin/sh
  3. #this is just an early test, not even proof of concept yet, nothing variablised yet, just testing this one...
  4. #fontcat's being made to use the bedrock logo for now. eventually will be able to be used with any string.
  5. #what to call the string:
  6. textstringn=bedrock
  7. #what the text string actually is:
  8. textstringy="
  9. __ __ __
  10. \ \_________\ \____________\ \___
  11. \ _ \ _\ _ \ _\ __ \ __\ /
  12. \___/\__/\__/ \_\ \___/\__/\_\_\
  13. Bedrock Linux
  14. "
  15. #usefonty for not just being a 1-piece variable, will become all(*)'able and specifyiable from cl.
  16. #this'll need some thought beyond just making this a list. will need some whilings or for'ings
  17. fontydir="~/.fonts"
  18. usefonty=(ls $(fontydir) | egrep 'ttf|otb') #this is the janky point at which i decided i should save/add/commit/push before i jank it up worse noisey mess n lose the basics.
  19. #usefonty=nztt
  20. function themagic
  21. #here's the imagemagick magic:
  22. convert \
  23. -size 420x90 \
  24. xc:black \
  25. -font $i \
  26. -pointsize 5 \
  27. -fill white \
  28. -draw "text 0,0 '
  29. __ __ __
  30. \ \_________\ \____________\ \___
  31. \ _ \ _\ _ \ _\ __ \ __\ /
  32. \___/\__/\__/ \_\ \___/\__/\_\_\
  33. Bedrock Linux
  34. '" \
  35. fontcat-(echo $textstringn)-(echo $usefonty)-(echo (date +%F_%H%M%S)).png
  36. #the pseudocode development refines closer n closer to real code
  37. #the simple test develops closer to the complete featureset.
  38. # fontcat-(echo $textstringn)-(echo $usefonty)-(echo (date +%F_%R%M%S)).png
  39. # fontcat-bedrock-nztt(echo date +%F_%T).png
  40. # fontcat-bedrock-nztt.png
  41. end
  42. #and it all starts here:
  43. #ehrmagerd wat pseudocode madness is this? n_n
  44. for i in $fontylist; do themagic; end