Java applications missing font smoothing - ugly fonts

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

Java applications missing font smoothing - ugly fonts

Postby morgano » Jan 7th, '13, 16:05

Well not very ugly, but fonts are far from beautiful.
Do i need some special font package?
Other trick?
mga2-64, KDE
Last edited by doktor5000 on Jan 8th, '13, 21:04, edited 1 time in total.
Reason: adjusted thread title
At home & work Mandriva since 2006, Mageia 2011. Thinkpad T40, T43, T60, T400, T510, Dell M4400, M6300, Acer Aspire 7. Workstation using LVM, LUKS, VirtualBox, BOINC
morgano
 
Posts: 1493
Joined: Jun 15th, '11, 17:51
Location: Kivik, Sweden

Re: java applications looking ugly

Postby doktor5000 » Jan 7th, '13, 23:59

Can you please give an example which java application shows that problem, or better post a screenshot?
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18061
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: java applications looking ugly

Postby morgano » Jan 8th, '13, 14:21

Here a screenshot of Yapbam, Yet Another Personal Bank Manager, http://www.yapbam.net
The italic font is especially annoying when reading long lists...
I think i have decided anyhow to not use yapbam, but skrooge instead, bit it would be nice to fix the problem.
I see same issue with my invoicing program JFSfakt that also is java, but it do not use italics so it is better readable.

I guess smoothing of fonts is not supported?
Maybe there is a way to change which fonts java use?
Attachments
Yapbam-screenshot1.png
Yapbam-screenshot1.png (4.25 KiB) Viewed 2450 times
At home & work Mandriva since 2006, Mageia 2011. Thinkpad T40, T43, T60, T400, T510, Dell M4400, M6300, Acer Aspire 7. Workstation using LVM, LUKS, VirtualBox, BOINC
morgano
 
Posts: 1493
Joined: Jun 15th, '11, 17:51
Location: Kivik, Sweden

Re: java applications looking ugly

Postby doktor5000 » Jan 8th, '13, 21:03

morgano wrote:I guess smoothing of fonts is not supported?
Maybe there is a way to change which fonts java use?


Yes, seems like it doesn't use it. Sorry, can't help you with that, i'm not that much into Java ...
BTW: I've adjusted the thread title to something more suitable and meaningful ...
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18061
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Java applications missing font smoothing - ugly fonts

Postby martinw » Jan 8th, '13, 22:48

Here, with Mageia-2 64-bit, GNOME, OpenJDK 1.7.0, anti-aliasing is working. Using the HelloWorldSwing example, I get

without-smoothing.png
Example with anti-aliasing disabled
without-smoothing.png (4.46 KiB) Viewed 2431 times

with-smoothing.png
Example with anti-aliasing enabled
with-smoothing.png (6.08 KiB) Viewed 2431 times


Under GNOME, this can be changed whilst the Java program is running, using the GNOME Tweak Tool.
martinw
 
Posts: 608
Joined: May 14th, '11, 10:59

Re: Java applications missing font smoothing - ugly fonts

Postby morgano » Jan 11th, '13, 00:06

OK Thanks, now i see what the problem is.
Now i just need to know what tool to use under KDE.
I could not find any i could understand from a net search... only talk about how to to if you write th eprogram and that seem not to be easy either. GNOME Tweak Tool was mentioned also. But nothing for KDE i found.
At home & work Mandriva since 2006, Mageia 2011. Thinkpad T40, T43, T60, T400, T510, Dell M4400, M6300, Acer Aspire 7. Workstation using LVM, LUKS, VirtualBox, BOINC
morgano
 
Posts: 1493
Joined: Jun 15th, '11, 17:51
Location: Kivik, Sweden

Re: Java applications missing font smoothing - ugly fonts

Postby martinw » Jan 11th, '13, 02:20

Don't know if this will work, but you could try installing and running gnome-tweak-tool. It may pull in other parts of GNOME, but unless you are short of disk space, that shouldn't hurt.
martinw
 
Posts: 608
Joined: May 14th, '11, 10:59

Re: Java applications missing font smoothing - ugly fonts

Postby morgano » Jan 12th, '13, 15:58

Yes it installs 50-60 MB packets. But still refuse to run.
Code: Select all
# /usr/bin/gnome-tweak-tool                       
WARNING : Error detecting shell                                                   
Traceback (most recent call last):                                               
  File "/usr/lib/python2.7/site-packages/gtweak/tweaks/tweak_shell_extensions.py", line 149, in __init__                                                           
    shell = GnomeShellFactory().get_shell()                                       
  File "/usr/lib/python2.7/site-packages/gtweak/utils.py", line 38, in getinstance
    instances[cls] = cls()                                                       
  File "/usr/lib/python2.7/site-packages/gtweak/gshellwrapper.py", line 143, in __init__                                                                           
    proxy = _ShellProxy()                                                         
  File "/usr/lib/python2.7/site-packages/gtweak/gshellwrapper.py", line 44, in __init__                                                                             
    result, output = self.proxy.Eval('(s)', js)                                   
  File "/usr/lib64/python2.7/site-packages/gi/overrides/Gio.py", line 148, in __call__                                                                             
    kwargs.get('flags', 0), kwargs.get('timeout', -1), None)                     
  File "/usr/lib64/python2.7/site-packages/gi/types.py", line 43, in function     
    return info.invoke(*args, **kwargs)
GError: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.Shell was not provided by any .service files
WARNING : Shell not running
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/gtweak/tweaks/tweak_shell.py", line 58, in __init__
    self._shell = GnomeShellFactory().get_shell()
  File "/usr/lib/python2.7/site-packages/gtweak/utils.py", line 38, in getinstance
    instances[cls] = cls()
  File "/usr/lib/python2.7/site-packages/gtweak/gshellwrapper.py", line 143, in __init__
    proxy = _ShellProxy()
  File "/usr/lib/python2.7/site-packages/gtweak/gshellwrapper.py", line 44, in __init__
    result, output = self.proxy.Eval('(s)', js)
  File "/usr/lib64/python2.7/site-packages/gi/overrides/Gio.py", line 148, in __call__
    kwargs.get('flags', 0), kwargs.get('timeout', -1), None)
  File "/usr/lib64/python2.7/site-packages/gi/types.py", line 43, in function
    return info.invoke(*args, **kwargs)
GError: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.Shell was not provided by any .service files
WARNING : Could not list shell extensions
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/gtweak/tweaks/tweak_shell.py", line 63, in __init__
    extensions = self._shell.list_extensions()
AttributeError: ShellThemeTweak instance has no attribute '_shell'
WARNING : Testing for expected AutostartCondition failed: Got (None)
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/gtweak/utils.py", line 152, in uses_autostart_condition
    return asc.split(" ", 1)[0] == autostart_type
AttributeError: 'NoneType' object has no attribute 'split'

(gnome-tweak-tool:14942): GLib-GIO-ERROR **: Settings schema 'org.gnome.nautilus.desktop' is not installed

Spårningsfälla
(he last word is swedish, translates directly to "track trap")
Starting it as normal user give no output at all
I have no idea what "shell" it need.
/usr/share/doc/gnome-tweak-tool/README is not helpful, just saying we should not talk about it ;)
At home & work Mandriva since 2006, Mageia 2011. Thinkpad T40, T43, T60, T400, T510, Dell M4400, M6300, Acer Aspire 7. Workstation using LVM, LUKS, VirtualBox, BOINC
morgano
 
Posts: 1493
Joined: Jun 15th, '11, 17:51
Location: Kivik, Sweden

Re: Java applications missing font smoothing - ugly fonts

Postby morgano » Jan 12th, '13, 17:11

Installed gnome-minimal, logged out of KDE and into gnome,
run /usr/bin/gnome-tweak-tool from terminal, window "Advanced Settings" shows up,
i select cathegory fonts and hinting is medium.
I can not find anything specific to java. Is some extension module neded?

When i start my java program in gnome it looks the same as in KDE.
At home & work Mandriva since 2006, Mageia 2011. Thinkpad T40, T43, T60, T400, T510, Dell M4400, M6300, Acer Aspire 7. Workstation using LVM, LUKS, VirtualBox, BOINC
morgano
 
Posts: 1493
Joined: Jun 15th, '11, 17:51
Location: Kivik, Sweden

Re: Java applications missing font smoothing - ugly fonts

Postby martinw » Jan 12th, '13, 19:52

I have Hinting set to Medium and Anti-aliasing set to Rgba. Nothing specific to Java.

Just to check, are you using OpenJDK 1.7.0? I think anti-aliasing support is a fairly recent addition.

Could you try the HelloWorldSwing example I linked to, so we are both looking at the same thing.
martinw
 
Posts: 608
Joined: May 14th, '11, 10:59

Re: Java applications missing font smoothing - ugly fonts

Postby lemonzest » Jan 13th, '13, 11:04

export _JAVA_OPTIONS=-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true

enables AA in java, no need for gnome packages.
Mobo: MSI 990FXA-GD80, CPU: Phenom II x6 @3.6/4Ghz, Ram: 16GB A-Data DDR3 1333Mhz
HDD: Kingston V200 128GB SSD, Samsung Green 1TB x 3
GPU: ASUS Radeon HD 6670 1GB, 3 Screen Eyefinity :)
OS: Mageia Cauldron x86_64 Edition
User avatar
lemonzest
 
Posts: 6
Joined: Jun 12th, '12, 23:11

Re: Java applications missing font smoothing - ugly fonts

Postby morgano » Jan 13th, '13, 18:10

Thank you lemozest
It do say it picks up the options, but still look the same though, used in terminal, running KDE:
Code: Select all
[morgan@T61M JFSFakt]$ export '_JAVA_OPTIONS=-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true'
[morgan@T61M JFSFakt]$ ./JFSFakturering
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true
(JFSFakturering is manufacturers original shell script to do checks and start the java program)

I had both java-1.7.0-openjdk, and java-1.6.0-openjdk installed. Uninstalled 1.6.0, no change. Uninstalled 1.7.0 too... and no change...!!

Obviously it use internal java... The script is too complicated for me... I do see it checks for installed java several places, runs some java tests and seem to be able to unpack bundled jre if no local found. Obviously it use internal as systems java are uinstalled.

Well i give up for now, i can read this important program good anyway, and otehr java progs i have now abandoned.
But i have learned something and i hope the export trick can help someone else.
Thank you guys :)
At home & work Mandriva since 2006, Mageia 2011. Thinkpad T40, T43, T60, T400, T510, Dell M4400, M6300, Acer Aspire 7. Workstation using LVM, LUKS, VirtualBox, BOINC
morgano
 
Posts: 1493
Joined: Jun 15th, '11, 17:51
Location: Kivik, Sweden


Return to Basic support

Who is online

Users browsing this forum: Google [Bot] and 1 guest