Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save solve-calc/3815d07d659e788efc9929aee5afac4d to your computer and use it in GitHub Desktop.
Save solve-calc/3815d07d659e788efc9929aee5afac4d to your computer and use it in GitHub Desktop.
$10.00 // ttf -> png
Gig Offer: $10.00 // ttf -> png
(defn font->png [ttf-font-name]
...
)
ttf-font-name = string, pointing to a ttf file on the filesystem
output:
(really a side effect)
function writes out.png
out.png = 1600 x 800
where
for y in (range 8)
for x in (range 16)
char (y*16+x) is drawn at (x*100, y*100)
rendering needs to be done via Java AWT
plese don't use external dependencies (besides Java API)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment