🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.api
Article #193

fonts problem between windows & linux

#193
From: Steve Shapiro
Date: Tue, 19 Oct 2004 17:58
95 lines
3674 bytes
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
>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)" <paul@computer-logic.net> wrote in message
news:4166f7aa$1@newsgroups.borland.com...
>
> "Steve Shapiro" <sshapiro@rosettatechnologies.com> wrote in message
> news:4166a3fb$1@newsgroups.borland.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();
>     }
>
>
Technical Details
Message-ID: <417555d9$2@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 1089d0,fef5d44c925b8265,start
X-Google-Attributes: gid1089d0,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Steve Shapiro" <sshapiro@rosettatechnologies.com>
Newsgroups: borland.public.jbuilder.java.api
Subject: fonts problem between windows & linux
Date: Tue, 19 Oct 2004 13:58:50 -0400
Lines: 98
Organization: Rosetta Technologies
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
NNTP-Posting-Host: 69.38.123.57
Message-ID: <417555d9$2@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1098208729 69.38.123.57 (19 Oct 2004 10:58:49 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail