Thread View: borland.public.jbuilder.java.api
2 messages
2 total messages
Started by Steve Shapiro
Tue, 19 Oct 2004 17:58
fonts problem between windows & linux
Author: Steve Shapiro
Date: Tue, 19 Oct 2004 17:58
Date: Tue, 19 Oct 2004 17:58
95 lines
3674 bytes
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();
> }
>
>
Re: fonts problem between windows & linux
Author: Paul Nichols (TeamB)
Date: Tue, 26 Oct 2004 20:07
Date: Tue, 26 Oct 2004 20:07
6 lines
1078 bytes
1078 bytes
"Steve Shapiro" <sshapiro@rosettatechnologies.com> wrote in message news:417555d9$2@newsgroups.borland.com... > Howdy! > Do you have the IDE pointing to the same JDK where these fonts are located?
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads