Scale font to fit width and height
- From: "SPG" <steve.nospoo.goodsell@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 27 Apr 2005 13:22:31 GMT
Hi,
I posted recently about rescaling fonts using AWT (JDK 1.1) only.
My problem is that using only JDK1.1 (for MS supported applets), we must
dynamically resize a font so that it is stretched or shrunk to fit a screen.
With JDK1.2+ there is no problem, we just derive a font ( Font.deriveFont())
passing an AffineTransform object. Works a treat. What I need to do is the
exact same thing using JDK1.1. I know it is ridiculous to have to support
1.1 but many of our customers will not use anything else ( I keep putting
the argument of writing a .NET app but supporting VB 3, no one seems to
agree that is the same thing!!!)
Anyhow, Had some helpful responses from John McGrath who suggested a couple
of work arounds.
One was to simply re-size the font so that it fits on the screen, then pad
the height so that the data still fills the screen.
This sort of worked, but if you have in irregular shaped window we were back
in the same situation where the fonts were only filling half a screen.
So, what I really want from you guys is a few pointers as how I can best
achieve this solution. There must be terminal emulators out there from the
early days that can do this type of resizing?
Looking forward to your responses...
Steve
.
- Prev by Date: Re: using JOptionPane's error icon
- Next by Date: Re: Modal and non modal in same app
- Previous by thread: How to scroll to a cell in a JTable
- Next by thread: Problem with Font.createGlyphVector(frc, String)
- Index(es):
Relevant Pages
|