Skip to content

Instantly share code, notes, and snippets.

@phl0w
Created July 22, 2012 10:43
Show Gist options
  • Select an option

  • Save phl0w/3159220 to your computer and use it in GitHub Desktop.

Select an option

Save phl0w/3159220 to your computer and use it in GitHub Desktop.
public static boolean downloadFont() {
try {
InputStream in = new BufferedInputStream(new URL("http://phl0w.com/crap/bebas.ttf").openStream());
Variables.font = Font.createFont(Font.TRUETYPE_FONT, in);
return Variables.font != null;
} catch (Exception e) {
e.printStackTrace();
}
return false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment