Skip to content

Instantly share code, notes, and snippets.

@c-garcia
Created April 12, 2015 10:06
Show Gist options
  • Save c-garcia/5b5041b607730d3348bf to your computer and use it in GitHub Desktop.
Save c-garcia/5b5041b607730d3348bf to your computer and use it in GitHub Desktop.
Register a TrueType font from a file
;; From the REPL
(import '(java.awt GraphicsEnvironment Font) java.io.File)
(.. (GraphicsEnvironment/getLocalGraphicsEnvironment)
(registerFont (Font/createFont Font/TRUETYPE_FONT
(File. "font.ttf"))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment