Ugly fonts in Java applications

Hi there,

I have installed Netbeans IDE on my Netbook and on my PC (openSUSE 11.4 32 bit and openSUSE 11.4 64 bit). On both has the UI a ugly font. I don’t really know how to change it.
I already searched the web but I couldn’t find anything related.
Have a look how it looks like: http://img52.imageshack.us/img52/821/20110624javauglyfont.th.png](http://img52.imageshack.us/i/20110624javauglyfont.png/)
Uploaded with ImageShack.us

And then the “original”: http://lizards.opensuse.org/wp-content/uploads/2009/06/netbeans.png
OK, this picture is already 3 years old but I don’t think that Oracle would change Netbeans UI font to look creepy.

And ideas how I can change it to normal?

Thanks!

On 06/24/2011 09:06 AM, Ctwx wrote:
>
> Netbeans IDE … how I can change it … ?

open the netbeans setup, find the font settings section, and change it
to something un-ugly to you.


DD
Caveat
Hardware
Software
24 June: Sunrise 4:36 AM, Sunset 10:03 PM

Thank you. I found the configuration but it only changes the font in the editor. The UI itself remains ugly. It is like the font that is required is not installed. But there should be a way to change Javas global default font? Like in KDE -> Systemsettings -> Apprearance -> Fonts.

On 06/24/2011 11:06 AM, Ctwx wrote:
>
> I found the configuration but it only changes the font in the
> editor.

oh…i don’t know how to do that…but, i guess it is a truetype font
(*.ttf)…

maybe if you use YaST to install ‘fetchmsttfonts’ it will then find
the file it is looking for (you said “It is like the font that is
required is not installed”.)

but, i guess there must be a java way to tell it which font to
use…do you know any programmers?

one of them might know how to find that in the java documentation…you
HAVE looked for you answer, right??

have you tried something like this:

http://www.google.com/search?q=global+java+font+selection

i say like that because maybe a different search string will find
better info, like:

http://www.google.com/search?q=how+to+change+netbean+menu+font turns up
this interesting looking hit:

http://netbeanside61.blogspot.com/2008/05/netbeans-ide-default-font-size.html

which i think answers your question (if using windows) but it should be
not a big problem to find and edit the netbeans.conf file on your
openSUSE, should it??

that is what any programmer could do :wink:


DD
Caveat
Hardware
Software
24 June: Sunrise 4:36 AM, Sunset 10:03 PM

Thank you! Now, the UI looks great. :slight_smile:

Yes, there should be. I think it has something to do with /usr/lib64/jvm/java-1.6.0-openjdk-1.6.0/jre/lib/fontconfig.SuSE.properties. I have found something in the Archlinux Wiki: https://wiki.archlinux.org/index.php/Java_Runtime_Environment_Fonts#Default_fonts
Somehow, the Lucida font is not delivered and not available in openSUSE (search with locate for lucida and I also search in the repos for it. No results.)

I already did. But they explain things with fontconfig.properties. But there would be a problem I thought, since every time SuSEconfig --module fonts was executed, it overwrites fontconfig.SuSE.properties. So, there has to be an other place where the fonts are configure. This must be somewhere in /etc/fonts but I couldn’t find the right place.

This is for programmers who program with Java not for users. :confused:

It does not help if I change anything in Netbeans since this problem is not related with NetBeans. It’s and Java/openSUSE problem. The font seems to be missing. Now, after installing fetchmsfonts it works. It probably takes an alternative font. Arial or whatever is defined. But I’d rather take Linux fonts. :slight_smile: I like DejaVu.

As said, not a NetBeans problem. :confused: This does not solve the problem, it only avoids them. I like to solve this problem. I don’t think I’m the only one who had this problem.

But thank you for your answer. At least, it looks much better than before. :smiley:

You ran into a general openJDK problem, where it has a problem with font
renedering, you can improve that but I did too long ago so I forgot the
exact steps.
If you remove openJDK and replace it with the java-1_6_0-sun (and related
packages like java-1_6_0-sun-devel since you use a programming environment)
your problem should be solved or at least it should be better.
Is it an option for you to use the sun/oracle version of java 1.6?


PC: oS 11.3 64 bit | Intel Core2 Quad Q8300@2.50GHz | KDE 4.6.4 | GeForce
9600 GT | 4GB Ram
Eee PC 1201n: oS 11.4 64 bit | Intel Atom 330@1.60GHz | KDE 4.6.4 | nVidia
ION | 3GB Ram

On 06/24/2011 12:36 PM, Ctwx wrote:
>
> DenverD;2357574 Wrote:
>> maybe if you use YaST to install ‘fetchmsttfonts’ it will then find
>> the file it is looking for (you said “It is like the font that is
>> required is not installed”.)
> Thank you! Now, the UI looks great. :slight_smile:

welcome… fetchmsfonts (fetch MS Fonts) installs a pile of Microsoft
True Type [tm] fonts they released to free distribution some years back…


DD
Caveat
Hardware
Software
24 June: Sunrise 4:36 AM, Sunset 10:03 PM

That’s it! :smiley: Now I have the sun/oracle package installed and it works without the Microsoft fonts. Thank you very much for your answer.^^

Of course it is. It doesn’t matter, as long as it works. :slight_smile:

Summary:
So for everybody who’s interested. You can either install fetchmsttfonts to solve this problem or you can install the Oracle/Sun Java package java-1_6_0-sun.

I got fetchmsttfonts and the fonts are somewhat better now but still far from being easy on the eye.

What are the implications of installing Oracle/Sun Java package vs OpenJDK? I should be able to choose fonts and tweak anti-aliasing but what would it do to my Suse install? Should I uninstall OpenJDK first? Will by Icedtea plugin work? What about the updates?

Switching Java provider is a kind of an important decision, I’m afraid it might break things atm working otherwise perfectly well.

On 2012-07-13 13:16, Stan Ice wrote:
> What about the updates?

No updates.

Sun changed the licensing and the java from Sun can not be supplied by
openSUSE, you have to install it manually from the Sun site.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

Carlos E. R. wrote:
> On 2012-07-13 13:16, Stan Ice wrote:
>> What about the updates?
>
> No updates.
>
> Sun changed the licensing and the java from Sun can not be supplied by
> openSUSE, you have to install it manually from the Sun site.

s/Sun/Oracle/g

What about system integration? Will IcedTea plugin continue working or should I reconfigure something?

How can I undo changes? Actually that is a general question - in the instructions of tweaking font setup on Sun java there are plenty of “export” commands but I have now idea how to undo them if something goes wrong.

More importantly, though, how to easily revert to OpenJDK setup if Oracle Java doesn’t work out?

On 2012-07-13 15:14, Dave Howorth wrote:
> Carlos E. R. wrote:
>> On 2012-07-13 13:16, Stan Ice wrote:
>>> What about the updates?
>>
>> No updates.
>>
>> Sun changed the licensing and the java from Sun can not be supplied by
>> openSUSE, you have to install it manually from the Sun site.
>
> s/Sun/Oracle/g

Whatever :slight_smile:
Old dog no learn new tricks :-p


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

Is “s/Sun/Oracle/g” a mysterious new way of updating java? Or maybe the old way, I don’t know.

On 2012-07-13 17:26, Stan Ice wrote:
>
> Is “s/Sun/Oracle/g” a mysterious new way of updating java? Or maybe the
> old way, I don’t know.

:slight_smile:

ed(1)

rather: info ed


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

Stan Ice wrote:
> Is “s/Sun/Oracle/g” a mysterious new way of updating java? Or maybe the
> old way, I don’t know.

No, sorry, it’s a text editor command to replace the word Sun with the
word Oracle throughout Carlos’ posting. He made a mistake about who
changed the licence conditions.

As I said, fetchmsttfonts fixed the problem of ugly java fonts but it also introduced the problem of no less irritating MS fonts system wide - in the menus, window titles, panels - everywhere. I couldn’t find any GUI tools to fix that problem and gave myself the weekend to get used to them. Finally I uninstalled fetchmsttfonts.

If there’s a way to set system fonts after installing fetchmsttfonts I will give them another try.

In the meantime I got hold of a spare notebook with Suse 12.1 and currently trying to update it and switch to Sun Java following instructions here:

SDB:Installing Java - openSUSE