title: TTF Font with Java AWT Graphics
body: <p>Using AWT graphics, I am attempting to draw text with a .ttf font.  But when drawn on the screen it only displays text in what looks to be font size 1.</p>
  
  <p>Font initialization code:</p>
  
  <pre><code>font = Font.createFont(Font.TRUETYPE_FONT, new FileInputStream("font.ttf"));
  font.deriveFont(24F);
  fontSmall = Font.createFont(Font.TRUETYPE_FONT, new FileInputStream("font.ttf"));
  fontSmall.deriveFont(16F);
  </code></pre>
  
  <p>And yes, those statements are inside of a try statement.</p>
  
  <p>And the code that is supposed to correctly draw text with the font:</p>
  
  <pre><code>g.setFont(font);
  g.setColor(RED);
  g.drawString("Test123",10,10);
  g.setFont(fontSmall);
  g.drawString("Test123SMALL",10,10);
  </code></pre>
  
  <p>Thanks in advance :)</p>