• Post Reply Bookmark Topic Watch Topic
  • New Topic

Scaling Fonts  RSS feed

 
David Chippington
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there any way or classes that anyone knows of for scaling fonts ?
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use deriveFont from the Font class.
<code><pre>Font newFont = oldFont.deriveFont(2.0 * oldFont.getSize());</pre></code>
This code creates a new font twice the size of the old one, but otherwise identical.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!