Scale font to fit width and height



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


.



Relevant Pages

  • RE: Install font from ClickOnce application
    ... We have to code the font installation logic in the ... private static extern int SHGetFolderPath(IntPtr hwndOwner, int nFolder, ... private static string GetFontsPath() ... Microsoft Online Community Support ...
    (microsoft.public.dotnet.framework)
  • RE: RichTextControl looses formatting
    ... Thanks for using Microsoft Newsgroup Support Service, ... second set of characters' font and color in the RichTextControl, ... private void button1_Click ... richTextBox1.Select(selectionStart, selectionLength); ...
    (microsoft.public.dotnet.general)
  • RE: RichTextControl looses formatting
    ... Thanks for using Microsoft Newsgroup Support Service, ... second set of characters' font and color in the RichTextControl, ... private void button1_Click ...
    (microsoft.public.dotnet.general)
  • Re: font naming issue
    ... The name needn't to be in English. ... The specification for the font naming table is here: ... Microsoft Online Community Support ... nature are best handled working with a dedicated Microsoft Support Engineer ...
    (microsoft.public.office.developer.com.add_ins)
  • Re: Terribly frustrated with Visio 2003s regression in font suppo
    ... Unfortunately Visio is not in direct control of its font support. ... GDI+ is the newest rendering technology with many great benefits, ...
    (microsoft.public.visio.general)