-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
1.1.3
-
None
-
sparc
-
solaris_2.5.1
JDK 1.1 introduced the fonts.properties file
In that file we have templates indicating the system fonts to be used
when a Java font is requested.
On Solaris the specifications look like
helvetica.bold.0=-linotype-helvetica-bold-r-normal-sans-*-%d-*-*-p-*-iso8859-1
and also
sansserif.bold.0=-linotype-helvetica-bold-r-normal-sans-*-%d-*-*-p-*-iso8859-1
This is the equivalent of requesting Helvetica bold, and the %d is replaced
by your point size multiplied by 10.
For font sizes >= 12 this font looks fine.
however this particular font does not look at all bold when a point size
of 10 is specified. It is slightly wider spaced than the plain font, but not
at all bolder.
Thus it is poor choice, especially since this creates a regression from
JDK 1.0.2 and the built in JDK runtime default of
-adobe-helvetica-bold-r-*-*-10-*-*-*-*-*-iso8859-1
for the same request.
If you use either JDK 1.0.2, or remove the fonts.properties file from
JDK 1.1 you do indeed get a bold font
The fonts being used can be examined quite simply by running these
commands.
xfd -fn "-linotype-helvetica-bold-r-normal-sans-*-120-*-*-p-*-iso8859-1"
xfd -fn "-linotype-helvetica-bold-r-normal-sans-*-100-*-*-p-*-iso8859-1"
xfd -fn "-linotype-helvetica-bold-r-normal-sans-*-80-*-*-p-*-iso8859-1"
xfd -fn "-adobe-helvetica-bold-r-*-*-10-*-*-*-*-*-iso8859-1"
xfd -fn "-linotype-helvetica-bold-o-normal-sans-*-100-*-*-p-*-iso8859-1"
Note that I think all the bold variants of linotype are equally poor
for points sizes less tnan 12 . eg bold italic too.
// FontsFrame.java
import java.awt.*;
public class FontsFrame extends Frame {
public static void main(String[] args) {
FontsFrame ff = new FontsFrame();
ff.resize(350,150);
ff.show();
}
public void paint(Graphics g) {
Font f;
f = new Font("Helvetica", Font.PLAIN, 10);
g.setFont(f);
g.drawString("This is Helvetica 10 plain", 20, 40);
f = new Font("Helvetica", Font.BOLD, 10);
g.setFont(f);
g.drawString("This is Helvetica 10 bold", 20, 60);
f = new Font("Helvetica", Font.BOLD, 12);
g.setFont(f);
g.drawString("This is Helvetica 12 bold", 20, 80);
f = new Font("Courier", Font.PLAIN, 10);
g.setFont(f);
g.drawString("This is Courier 10 plain", 180, 40);
f = new Font("Courier", Font.BOLD, 10);
g.setFont(f);
g.drawString("This is Courier 10 bold", 180, 60);
f = new Font("Courier", Font.BOLD, 12);
g.setFont(f);
g.drawString("This is Courier 12 bold", 180, 80);
}
}
Name: rrT76497 Date: 05/06/98
Suseendran May 06,98. This bug is already in db.
Unable reproduce in Solaris 2.5, JDK1.2beta3
======================================================================
In that file we have templates indicating the system fonts to be used
when a Java font is requested.
On Solaris the specifications look like
helvetica.bold.0=-linotype-helvetica-bold-r-normal-sans-*-%d-*-*-p-*-iso8859-1
and also
sansserif.bold.0=-linotype-helvetica-bold-r-normal-sans-*-%d-*-*-p-*-iso8859-1
This is the equivalent of requesting Helvetica bold, and the %d is replaced
by your point size multiplied by 10.
For font sizes >= 12 this font looks fine.
however this particular font does not look at all bold when a point size
of 10 is specified. It is slightly wider spaced than the plain font, but not
at all bolder.
Thus it is poor choice, especially since this creates a regression from
JDK 1.0.2 and the built in JDK runtime default of
-adobe-helvetica-bold-r-*-*-10-*-*-*-*-*-iso8859-1
for the same request.
If you use either JDK 1.0.2, or remove the fonts.properties file from
JDK 1.1 you do indeed get a bold font
The fonts being used can be examined quite simply by running these
commands.
xfd -fn "-linotype-helvetica-bold-r-normal-sans-*-120-*-*-p-*-iso8859-1"
xfd -fn "-linotype-helvetica-bold-r-normal-sans-*-100-*-*-p-*-iso8859-1"
xfd -fn "-linotype-helvetica-bold-r-normal-sans-*-80-*-*-p-*-iso8859-1"
xfd -fn "-adobe-helvetica-bold-r-*-*-10-*-*-*-*-*-iso8859-1"
xfd -fn "-linotype-helvetica-bold-o-normal-sans-*-100-*-*-p-*-iso8859-1"
Note that I think all the bold variants of linotype are equally poor
for points sizes less tnan 12 . eg bold italic too.
// FontsFrame.java
import java.awt.*;
public class FontsFrame extends Frame {
public static void main(String[] args) {
FontsFrame ff = new FontsFrame();
ff.resize(350,150);
ff.show();
}
public void paint(Graphics g) {
Font f;
f = new Font("Helvetica", Font.PLAIN, 10);
g.setFont(f);
g.drawString("This is Helvetica 10 plain", 20, 40);
f = new Font("Helvetica", Font.BOLD, 10);
g.setFont(f);
g.drawString("This is Helvetica 10 bold", 20, 60);
f = new Font("Helvetica", Font.BOLD, 12);
g.setFont(f);
g.drawString("This is Helvetica 12 bold", 20, 80);
f = new Font("Courier", Font.PLAIN, 10);
g.setFont(f);
g.drawString("This is Courier 10 plain", 180, 40);
f = new Font("Courier", Font.BOLD, 10);
g.setFont(f);
g.drawString("This is Courier 10 bold", 180, 60);
f = new Font("Courier", Font.BOLD, 12);
g.setFont(f);
g.drawString("This is Courier 12 bold", 180, 80);
}
}
Name: rrT76497 Date: 05/06/98
Suseendran May 06,98. This bug is already in db.
Unable reproduce in Solaris 2.5, JDK1.2beta3
======================================================================
- duplicates
-
JDK-1235430 fp.bugs 3107 WinNT/95 bold font Alaris display not correct
-
- Closed
-