Hello
Is there anything that can be done to make the jdk1.2 fonts behave more
like the 1.1 ones? Included is a small testprogram with output. Notice the
difference in height of the fontmetrics.
Searching through the archives and the bug-reports gave at least one other
person (hmm, no mail addresses in the archive?) with the same problem, but
no solution. I've been playing with font.properties and the FontPath of my
X server, without improvments.
My FontPath when running the tests below (default font.properties):
FontPath "/usr/X11R6/lib/X11/fonts/75dpi:unscaled"
FontPath "/usr/X11R6/lib/X11/fonts/100dpi:unscaled"
FontPath "/usr/X11R6/lib/X11/fonts/75dpi/"
FontPath "/usr/X11R6/lib/X11/fonts/100dpi/"
FontPath "/usr/X11R6/lib/X11/fonts/URW/"
FontPath "/usr/X11R6/lib/X11/fonts/Type1/"
FontPath "/usr/X11R6/lib/X11/fonts/Speedo/"
FontPath "/usr/X11R6/lib/X11/fonts/misc:unscaled"
FontPath "/usr/X11R6/lib/X11/fonts/misc/"
(If I move the /75dpi/ entry down as I've seen in some example, emacs uses
some really ugly scaled bitmap(?) fonts)
jdk117_v1a:
sun.awt.motif.X11FontMetrics[font=java.awt.Font[family=Dialog,name=Dialog,
style=plain,size=12]ascent=11, descent=2, height=14]
sun.awt.motif.X11FontMetrics[font=java.awt.Font[family=SansSerif,
name=SansSerif,style=plain,size=12]ascent=11, descent=3, height=15]
sun.awt.motif.X11FontMetrics[font=java.awt.Font[family=Serif,name=Serif,
style=plain,size=12]ascent=11, descent=3, height=15]
sun.awt.motif.X11FontMetrics[font=java.awt.Font[family=Monospaced,
name=Monospaced,style=plain,size=12]ascent=10, descent=3, height=14]
sun.awt.motif.X11FontMetrics[font=java.awt.Font[family=DialogInput,
name=DialogInput,style=plain,size=12]ascent=11, descent=2, height=14]
jdk1.2pre1:
sun.awt.font.FontDesignMetrics[font=java.awt.Font[family=dialog,name=Dialog,
style=plain,size=12]ascent=15, descent=9, height=25]
sun.awt.font.FontDesignMetrics[font=java.awt.Font[family=sansserif,
name=SansSerif,style=plain,size=12]ascent=15, descent=9, height=25]
sun.awt.font.FontDesignMetrics[font=java.awt.Font[family=serif,name=Serif,
style=plain,size=12]ascent=12, descent=5, height=18]
sun.awt.font.FontDesignMetrics[font=java.awt.Font[family=monospaced,
name=Monospaced,style=plain,size=12]ascent=14, descent=9, height=24]
sun.awt.font.FontDesignMetrics[font=java.awt.Font[family=dialoginput,
name=DialogInput,style=plain,size=12]ascent=14, descent=9, height=24]
import java.awt.*;
public class AA
{
// List from Toolkit.getFontList()
static String[] fontnames = {
"Dialog",
"SansSerif",
"Serif",
"Monospaced",
"DialogInput",
};
public static void main(String[] argv)
throws Exception
{
Toolkit tk = Toolkit.getDefaultToolkit();
for(int i=0; i<fontnames.length; i++) {
Font f = new Font(fontnames[i], Font.PLAIN, 12);
FontMetrics fm = tk.getFontMetrics(f);
System.out.println(fm);
}
}
}
X Server is XFree86 (SVGA)
XFree86 Version 3.3.3 / X Window System
(protocol Version 11, revision 0, vendor release 6300)
Release Date: November 18 1998
glibc-2.0.7-19
running with '-green -Djava.compiler='
So is it a bug or just misconfiguration?
Or is this size a property of these fonts?
If you get nice looking fonts, try the above. What's the output?
(and how did you do it? :)
/Urban
---
Urban Widmark [EMAIL PROTECTED]
Svenska Test AB +46 90 71 71 23
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]