Board index » jbuilder » fonts problem between windows & linux

fonts problem between windows & linux


2004-10-20 01:58:50 AM
jbuilder3
Howdy!
Here are the fonts that are in the subdir you indicated:
fonts.dir
LucidaBrightDemiBold.ttf
LucidaBrightDemiItalic.ttf
LucidaBrightItalic.ttf
LucidaBrightRegular.ttf
LucidaSansDemiBold.ttf
LucidaSansDemiOblique.ttf
LucidaSansOblique.ttf
LucidaSansRegular.ttf
LucidaTypewriterBoldOblique.ttf
LucidaTypewriterBold.ttf
LucidaTypewriterOblique.ttf
LucidaTypewriterRegular.ttf
Here is a code fragment that I used to play around with the font:
Font fMyFont = contentPane.getFont();
if ( bDebugMode ) System.out.println("BEFORE: Font>" +
fMyFont.toString() + "<");
if ( bDebugMode ) System.out.println("BEFORE: Font Family>" +
fMyFont.getFamily() + "<");
contentPane.setFont(new java.awt.Font("Courier", Font.PLAIN, 8));
fMyFont = contentPane.getFont();
if ( bDebugMode ) System.out.println("AFTER: Font>" +
fMyFont.toString() + "<");
if ( bDebugMode ) System.out.println("AFTER: Font Family>" +
fMyFont.getFamily() + "<");
Here is the output from the fragment:
BEFORE: Font>javax.swing.plaf.FontUIResource[family=sansserif,name=MS Sans
Serif,style=plain,size=11]<
BEFORE: Font Family>sansserif<
AFTER: Font
Quote
java.awt.Font[family=monospaced,name=Courier,style=plain,size=8]<
AFTER: Font Family>monospaced<
I then substituted the following for the above setFont:
contentPane.setFont(new java.awt.Font("LucidaSansRegular", Font.PLAIN, 8));
But it didn't seem to make any difference when I tried running this on
Linux.
Thanks.
Regards,
Steve.
"Paul Nichols (TeamB)" < XXXX@XXXXX.COM >wrote in message
Quote

"Steve Shapiro" < XXXX@XXXXX.COM >wrote in message
news:4166a3fb$ XXXX@XXXXX.COM ...
>Howdy All!
>
>I have developed a jbuilder application on a Windows 2000 platform and
it
>works and displays fine.
>
>I created a jar file and copied it to my Linux system, and when I run
the
>application, it works fine, but it doesn't display properly.
>
>The fonts are too large and many of the labels are truncated.
>
>I have tried a variety of things, but no matter what I do, the displayed
>fonts don't change.
>
Are you using non standard fonts? If so, you would have to make sure that
the same fonts are installed in the font directory of the Unix/Linux box.

See the /usr/java/<jre>/lib/fonts folder on the Unix boxes.

Also, make sure that you are using the PluggableLookAnd Feel for xPlatform
work.

Example:

try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
}
catch(Exception e) {
e.printStackTrace();
}


 
 

Re:fonts problem between windows & linux

"Steve Shapiro" < XXXX@XXXXX.COM >wrote in message
Quote
Howdy!

Do you have the IDE pointing to the same JDK where these fonts are located?