Mombu the Programming Forum sponsored links

Go Back   Mombu the Programming Forum > Programming > font problems
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 18th January 06:03
steve shapiro
External User
 
Posts: 1
Default font problems


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.

What do I need to do?

Please advise.

Thanks.

Regards,
Steve.

sshapiro@rosettatechnologies.com
  Reply With Quote


  sponsored links


2 18th January 06:03
paul nichols \(teamb\)
External User
 
Posts: 1
Default font problems


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.getSystemLookAn dFeelClassName());
}
catch(Exception e) {
e.printStackTrace();
}
  Reply With Quote
3 25th January 03:37
steve shapiro
External User
 
Posts: 1
Default font problems


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

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.
  Reply With Quote
Reply


Thread Tools
Display Modes




Copyright 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666