Font - createFont & drawString
843807Oct 25 2006 — edited Oct 29 2006I'm trying to load a TrueType Font & use that font in a TitleBorder and various other places (sometimes in AWT or Swing components, sometimes just by calling drawString).
I'm able to load the Font successfully but it is not being painted successfully. In other words, the font that is being drawn is NOT the font that I created.
Is there a problem with using Fonts and calling drawString on that Font? Even when using that Font with Swing components?
TITLE_FONT = Font.createFont(Font.TRUETYPE_FONT,new File("KABELN.TTF"));
LineBorder lineBorder = new LineBorder(TITLE_COLOR);
TitledBorder titleBorder = BorderFactory.createTitledBorder(
lineBorder,"My Title",TitledBorder.LEFT, TitledBorder.ABOVE_TOP,
TITLE_FONT, TITLE_COLOR);
ARG! It is not using the Kabel font for the title of my border
I'm using 1.5.0_04-b05
Any ideas? Thanks