-
Bug
-
Resolution: Duplicate
-
P3
-
None
-
1.2.1
-
None
-
sparc
-
solaris_2.6
Even when running a very simple swing program, the fontpath in CDE is
being modified. This is particularly inconvenient on systems that do not
have their fonts installed localy but rely on fontserver support. This is
the case with xterminals or PCs running eXceed.
In addition it is not acceptable to modify the general X11 fontpath at all because this can affect other X based applications. I think if swing requires
some fonts, it can certainly search for them on the system and use them.
However there is no reason to modify the global font path.
To reproduce (I've used a Solaris 2.6 system):
TV> which java
/usr/java1.2/bin/java
TV> java -fullversion
java full version "Solaris_JDK_1.2.1_03"
TV> javac TestFrame.java
TV> xset -q
Keyboard Control:
auto repeat: on key click percent: 0 LED mask: 00000000
auto repeating keys: 00faaf8becff67f2
ff7bf0ff1ff89f03
1900000000000000
0000000000000000
bell percent: 50 bell pitch: 400 bell duration: 100
Pointer Control:
acceleration: 2/1 threshold: 4
Screen Saver:
prefer blanking: yes allow exposures: no
timeout: 0 cycle: 0
Colors:
default colormap: 0x35 BlackPixel: 0 WhitePixel: 16777215
Font Path:
/usr/openwin/lib/X11/fonts/F3/,/usr/openwin/lib/X11/fonts/F3bitmaps/,/usr/openwin/lib/X11/fonts/Type1/,/usr/openwin/lib/X11/fonts/Speedo/,/usr/openwin/lib/X11/fonts/misc/,/usr/openwin/lib/X11/fonts/75dpi/,/usr/openwin/lib/X11/fonts/100dpi/,/home/tv/fontadm_fonts/
Bug Mode: compatibility mode is disabled
TV> java TestFrame
^CTV> xset -q
Keyboard Control:
auto repeat: on key click percent: 0 LED mask: 00000000
auto repeating keys: 00faaf8becff67f2
ff7bf0ff1ff89f03
1900000000000000
0000000000000000
bell percent: 50 bell pitch: 400 bell duration: 100
Pointer Control:
acceleration: 2/1 threshold: 4
Screen Saver:
prefer blanking: yes allow exposures: no
timeout: 0 cycle: 0
Colors:
default colormap: 0x35 BlackPixel: 0 WhitePixel: 16777215
Font Path:
/usr/openwin/lib/X11/fonts/F3/,/usr/openwin/lib/X11/fonts/F3bitmaps/,/usr/openwin/lib/X11/fonts/Type1/,/usr/openwin/lib/X11/fonts/Speedo/,/usr/openwin/lib/X11/fonts/misc/,/usr/openwin/lib/X11/fonts/75dpi/,/usr/openwin/lib/X11/fonts/100dpi/,/home/tv/fontadm_fonts/,/usr/openwin/lib/locale/sun_eu_greek/X11/fonts/Type1/,/usr/openwin/lib/locale/sun_eu_greek/X11/fonts/TrueType/,/usr/openwin/lib/locale/iso_8859_9/X11/fonts/Type1/,/usr/openwin/lib/locale/iso_8859_7/X11/fonts/Type1/,/usr/openwin/lib/locale/iso_8859_5/X11/fonts/Type1/,/usr/openwin/lib/locale/iso_8859_4/X11/fonts/Type1/,/usr/openwin/lib/locale/iso_8859_2/X11/fonts/Type1/,/usr/openwin/lib/locale/iso_8859_15/X11/fonts/TrueType/,/usr/openwin/lib/X11/fonts/TTbitmaps/,/usr/openwin/lib/X11/fonts/TrueType/
Bug Mode: compatibility mode is disabled
TV> cat TestFrame.java
import javax.swing.*;
class TestFrame extends JFrame{
JTextField ta = new JTextField("This is an example with german umlauts: ÄÖÜäöü");
public TestFrame(){
ta.setEditable(false);
this.setTitle("TestFrame für FontServer-Test");
this.getContentPane().add(ta);
}
public static void main (String[] argv){
TestFrame aTestFrame = new TestFrame();
aTestFrame.pack();
aTestFrame.show();
}
}
BTW: Java1.1.X did not do this. Although it was necesary to explicitly load the
swing classes, the font path wasn't modified.
being modified. This is particularly inconvenient on systems that do not
have their fonts installed localy but rely on fontserver support. This is
the case with xterminals or PCs running eXceed.
In addition it is not acceptable to modify the general X11 fontpath at all because this can affect other X based applications. I think if swing requires
some fonts, it can certainly search for them on the system and use them.
However there is no reason to modify the global font path.
To reproduce (I've used a Solaris 2.6 system):
TV> which java
/usr/java1.2/bin/java
TV> java -fullversion
java full version "Solaris_JDK_1.2.1_03"
TV> javac TestFrame.java
TV> xset -q
Keyboard Control:
auto repeat: on key click percent: 0 LED mask: 00000000
auto repeating keys: 00faaf8becff67f2
ff7bf0ff1ff89f03
1900000000000000
0000000000000000
bell percent: 50 bell pitch: 400 bell duration: 100
Pointer Control:
acceleration: 2/1 threshold: 4
Screen Saver:
prefer blanking: yes allow exposures: no
timeout: 0 cycle: 0
Colors:
default colormap: 0x35 BlackPixel: 0 WhitePixel: 16777215
Font Path:
/usr/openwin/lib/X11/fonts/F3/,/usr/openwin/lib/X11/fonts/F3bitmaps/,/usr/openwin/lib/X11/fonts/Type1/,/usr/openwin/lib/X11/fonts/Speedo/,/usr/openwin/lib/X11/fonts/misc/,/usr/openwin/lib/X11/fonts/75dpi/,/usr/openwin/lib/X11/fonts/100dpi/,/home/tv/fontadm_fonts/
Bug Mode: compatibility mode is disabled
TV> java TestFrame
^CTV> xset -q
Keyboard Control:
auto repeat: on key click percent: 0 LED mask: 00000000
auto repeating keys: 00faaf8becff67f2
ff7bf0ff1ff89f03
1900000000000000
0000000000000000
bell percent: 50 bell pitch: 400 bell duration: 100
Pointer Control:
acceleration: 2/1 threshold: 4
Screen Saver:
prefer blanking: yes allow exposures: no
timeout: 0 cycle: 0
Colors:
default colormap: 0x35 BlackPixel: 0 WhitePixel: 16777215
Font Path:
/usr/openwin/lib/X11/fonts/F3/,/usr/openwin/lib/X11/fonts/F3bitmaps/,/usr/openwin/lib/X11/fonts/Type1/,/usr/openwin/lib/X11/fonts/Speedo/,/usr/openwin/lib/X11/fonts/misc/,/usr/openwin/lib/X11/fonts/75dpi/,/usr/openwin/lib/X11/fonts/100dpi/,/home/tv/fontadm_fonts/,/usr/openwin/lib/locale/sun_eu_greek/X11/fonts/Type1/,/usr/openwin/lib/locale/sun_eu_greek/X11/fonts/TrueType/,/usr/openwin/lib/locale/iso_8859_9/X11/fonts/Type1/,/usr/openwin/lib/locale/iso_8859_7/X11/fonts/Type1/,/usr/openwin/lib/locale/iso_8859_5/X11/fonts/Type1/,/usr/openwin/lib/locale/iso_8859_4/X11/fonts/Type1/,/usr/openwin/lib/locale/iso_8859_2/X11/fonts/Type1/,/usr/openwin/lib/locale/iso_8859_15/X11/fonts/TrueType/,/usr/openwin/lib/X11/fonts/TTbitmaps/,/usr/openwin/lib/X11/fonts/TrueType/
Bug Mode: compatibility mode is disabled
TV> cat TestFrame.java
import javax.swing.*;
class TestFrame extends JFrame{
JTextField ta = new JTextField("This is an example with german umlauts: ÄÖÜäöü");
public TestFrame(){
ta.setEditable(false);
this.setTitle("TestFrame für FontServer-Test");
this.getContentPane().add(ta);
}
public static void main (String[] argv){
TestFrame aTestFrame = new TestFrame();
aTestFrame.pack();
aTestFrame.show();
}
}
BTW: Java1.1.X did not do this. Although it was necesary to explicitly load the
swing classes, the font path wasn't modified.
- duplicates
-
JDK-4242294 Java sets fontpath, but it shouldn't.
-
- Resolved
-