openjdk label display in swing ui elements takes up too much vertical space

Bug #255983 reported by Fritz Heinrichmeyer
50
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenJDK
Fix Released
Medium
openjdk-6 (Ubuntu)
Fix Released
Medium
Unassigned
Declined for Karmic by Matthias Klose
Hardy
Won't Fix
Medium
Unassigned
Intrepid
Invalid
Medium
Unassigned
Jaunty
Fix Released
Undecided
Unassigned

Bug Description

i am on Ubuntu 8.04.1, effect is the same on i386 and amd64, Package: openjdk-6-jre, Version: 6b11-2ubuntu2

Swing UI elements (lists, labels) have additional vertical space, some applets user interfaces are therefore broken with openjdk. In contrast sun-java6-jre works fine with tvbrowser and other applets. I attached a good and a bad png-image. The java program to render the example is ugly but still useable with openjdk but i think the error is shown clearly in comparison of the bad openjdk.png with the good sun sun-java.png.

Revision history for this message
Fritz Heinrichmeyer (fritz-heinrichmeyer) wrote :
Revision history for this message
Fritz Heinrichmeyer (fritz-heinrichmeyer) wrote :

here comes the good example

Revision history for this message
Carlos Correia (carlos-m16e) wrote :

I confirm that bug too.

More: I've substituted /etc/java-6-openjdk with the one from the previous package (which I took from a machine which haven't been updated), and the size of the elements seems to be OK, though the fonts are rather ugly.

Revision history for this message
Carlos Correia (carlos-m16e) wrote :

Now with OpenJDK

Revision history for this message
Carlos Correia (carlos-m16e) wrote :

And, finally, with OpenJDK with the /etc/java-6-openjdk from previous package...

Hope this helps.

Revision history for this message
Fritz Heinrichmeyer (fritz-heinrichmeyer) wrote :

copying

etc/java-6-openjdk/fontconfig.bfc

from the package openjdk-6-jre-headless_6b09-0ubuntu2_amd64.deb

to /etc/java-6-openjdk

helped here on an amd64 box. I think the same will work for other architectures accordingly.

BTW:
Which action is supposed to restore the files in /etc/java-6-openjdk?
To confirm the mentioned effect i deleted /etc/java-6-openjdk and did not find the right "apt-get install --reinstall <package>" command to rebuild this directory. However of course it was no problem to reconstruct the directory "by hand".

Revision history for this message
Matthias Klose (doko) wrote :

the fontconfig confiiguration was changed with 6b11 in hardy-updates and intrepid. please could you recheck?

Changed in openjdk-6:
status: New → Incomplete
Revision history for this message
Carlos Correia (carlos-m16e) wrote :

Indeed, it changed. That's what this bug is about.

Plese read, the first paragraph from the first post: "Package: openjdk-6-jre, Version: 6b11-2ubuntu2"

This is the buggy version. Once you downgrade to 6b09-0ubuntu2, it's OK.

Revision history for this message
Trent McPheron (tiz-ex1) wrote :

Downgrading helped part of the problem, as did installing sun-java6-fonts. But spacing is still excessively large. I'll add screenshots to show you.

Revision history for this message
Trent McPheron (tiz-ex1) wrote :
Revision history for this message
Trent McPheron (tiz-ex1) wrote :

Blank lines shouldn't be this huge.

Revision history for this message
Carlos Correia (carlos-m16e) wrote :

@Trent: Downgrading to 6b09-0ubuntu2 indeed solves the problem! That's the version I'm using right now (and also our customers).

"But spacing is still excessively large"... are you sure you're using 6b09-0ubuntu2???

What's the output of: 'java -version' ?

Revision history for this message
Trent McPheron (tiz-ex1) wrote :

Did 6b09 fix the spacing issue for you? As in the screenshot?

I had 6b11 installed before. The current version. Downgrading was really tough. I had to remove all of them and then specifically install 6b09 with each package, through synaptic. Maybe I should have purged instead of removing?

In any case, java -version outputs:

java version "1.6.0"
OpenJDK Runtime Environment (build 1.6.0-b09)
OpenJDK Client VM (build 1.6.0-b09, mixed mode, sharing)

Revision history for this message
Trent McPheron (tiz-ex1) wrote :

Correction: Through aptitude, not synaptic. It's impossible to downgrade anything with dependencies through synaptic.

Revision history for this message
Carlos Correia (carlos-m16e) wrote :
Download full text (7.4 KiB)

I just executed this command:

sudo apt-get install openjdk-6-jdk=6b09-0ubuntu2 \
openjdk-6-jre=6b09-0ubuntu2 openjdk-6-jre-headless=6b09-0ubuntu2 \
openjdk-6-jre-lib=6b09-0ubuntu2

and then to put these packages on hold:

sudo echo "openjdk-6-jdk hold" | dpkg --set-selections
sudo echo "openjdk-6-jre hold" | dpkg --set-selections
sudo echo "openjdk-6-jre-lib hold" | dpkg --set-selections
sudo echo "openjdk-6-jre-headless hold" | dpkg --set-selections

But I also have sun-java6 installed because of the font package... it might make some difference, don't know. The main problem seems to be with font rendering.

Here is the output of: dpkg -l|grep font
ii console-setup 1.21ubuntu8 Set up the font and the keyboard on the cons
ii console-terminus 4.20-6 Fixed-width fonts for fast reading on the Li
ii console-tools 1:0.2.3dbs-65ubuntu7 Linux console and font utilities
ii defoma 0.11.10-0.2 Debian Font Manager -- automatic font config
ii fontconfig 2.5.0-2ubuntu3 generic font configuration library - support
ii fontconfig-config 2.5.0-2ubuntu3 generic font configuration library - configu
ii fontforge 0.0.20071110-1build2 Font editor for PS, TrueType and OpenType fo
ii gsfonts 1:8.11+urwcyr1.0.7~pre43-1 Fonts for the Ghostscript interpreter(s)
ii gsfonts-x11 0.20ubuntu1 Make Ghostscript fonts available to X11
ii gucharmap 1:2.22.1-0ubuntu2 Unicode character picker and font browser
ii libconsole 1:0.2.3dbs-65ubuntu7 Shared libraries for Linux console and font
ii libfontconfig1 2.5.0-2ubuntu3 generic font configuration library - runtime
ii libfontenc1 1:1.0.4-2 X11 font encoding library
ii libfonts-java 0.3.3-2 Java fonts layouting library
ii libfreetype6 2.3.5-1ubuntu4.8.04.1 FreeType 2 font engine, shared library files
ii libxfont1 1:1.3.1-2 X11 font rasterisation library
ii libxft2 2.1.12-2ubuntu5 FreeType-based font drawing library for X
ii mplayer-fonts 3.5-2 ...

Read more...

Revision history for this message
Trent McPheron (tiz-ex1) wrote :

I have all of those, and the large spacing still persists.

Revision history for this message
jeroenl (jeroenl) wrote :

I still have ugly (non aliases fonts) in Java apps.

When I do a dpkg -l | grep java, I have:

ii java-common 0.30ubuntu2 Base of all Java packages
ii sun-java6-bin 6-07-4ubuntu2 Sun Java(TM) Runtime Environment (JRE) 6 (ar
ii sun-java6-fonts 6-07-4ubuntu2 Lucida TrueType fonts (from the Sun JRE)
ii sun-java6-jre 6-07-4ubuntu2 Sun Java(TM) Runtime Environment (JRE) 6 (ar
ii sun-java6-plugin 6-07-4ubuntu2 The Java(TM) Plug-in, Java SE 6

When I do java -version:
java version "1.6.0_07"
Java(TM) SE Runtime Environment (build 1.6.0_07-b06)
Java HotSpot(TM) Client VM (build 10.0-b23, mixed mode, sharing)

See also bug #234314

Revision history for this message
jeroenl (jeroenl) wrote :

btw I'm on up-to-date Intrepid

Revision history for this message
Trent McPheron (tiz-ex1) wrote :

It looks like you're posting in an OpenJDK bug when you don't even have OpenJDK. But your fonts are ugly in Sun Java? That's interesting.

Revision history for this message
nyékhelyi gábor (n0gabor) wrote :

I hope Intrepid won't be released with buggy openjdk/swing!

Revision history for this message
Carlos Correia (carlos-m16e) wrote :

"I hope Intrepid won't be released with buggy openjdk/swing!"

Hey, God? Are You listening?

Revision history for this message
Fritz Heinrichmeyer (fritz-heinrichmeyer) wrote :

problem gone with

openjdk-6 Version: 6b12~pre1-0ubuntu5

Revision history for this message
nyékhelyi gábor (n0gabor) wrote :

I have openjdk-6 version 6b12~pre2-0ubuntu1

and still have the problem!

Revision history for this message
Fritz Heinrichmeyer (fritz-heinrichmeyer) wrote :

sorry maybe i had my old nonstandard fontconfig file. I look for it tomorrow, the box is at work.

Revision history for this message
Fritz Heinrichmeyer (fritz-heinrichmeyer) wrote :

problem returned with

Package: openjdk-6-jre-headless
Status: install ok installed
Priority: extra
Section: interpreters
Installed-Size: 66984
Maintainer: Ubuntu Core Developers <email address hidden>
Architecture: amd64
Source: openjdk-6
Version: 6b12~pre2-0ubuntu2

Revision history for this message
Matthias Klose (doko) wrote :

please point to a testcase

Revision history for this message
Fritz Heinrichmeyer (fritz-heinrichmeyer) wrote :

Ether install tvbrowser from http://www.tvbrowser.org/ where my attachments come from

or compile JButtonDemo.java from

https://www-rz.uni-hohenheim.de/anw/programme/prg/java/tutorials/javainsel4/javainsel_15_006.htm

you get a button which is not vertically centered as shown on the same page (the picture there of course is taken from the "java reference platform" windows-xp/vista/whatever ;-) ).

Revision history for this message
Matthias Klose (doko) wrote :

works fine for me with openjdk in intrepid. see the attachment

Revision history for this message
Fritz Heinrichmeyer (fritz-heinrichmeyer) wrote :

strange, i have no more ideas and will use sun-java6 for the next time. Maybe its amd64 or kde4 i give up for now.

For future tests: /usr/bin/policytool is a good example for almost no more working ugly dialogs.

Revision history for this message
Fritz Heinrichmeyer (fritz-heinrichmeyer) wrote :

amd64 and kde4 are wrong suspects i guess ...

Revision history for this message
Fritz Heinrichmeyer (fritz-heinrichmeyer) wrote :

the same jbutton with sun-java6 (correct one).

Revision history for this message
Fritz Heinrichmeyer (fritz-heinrichmeyer) wrote :

** IT DEPENDS ON CHARSET **

If i change locale from de_DE.UTF-8 to de_DE.ISO-8859-15 also openjdk-button is centered correct (see attachment). As stated by others in this thread, border or margin whatever is too large also with ISO-8859-15 coding.

Revision history for this message
nyékhelyi gábor (n0gabor) wrote :

still an issue with 6b12-0ubuntu4 on Intrepid

Changed in openjdk-6:
status: Incomplete → Confirmed
Revision history for this message
In , Matthias Klose (doko) wrote :

icedtea6 tip from Nov 11.

Swing UI elements (lists, labels) have additional vertical space, some applets user interfaces are therefore broken with openjdk. In contrast sun-java6-jre works fine with tvbrowser and other applets. I attached a good and a bad png-image. The java program to render the example is ugly but still useable with openjdk but i think the error is shown clearly in comparison of the bad openjdk.png with the good sun sun-java.png.

Revision history for this message
In , Matthias Klose (doko) wrote :
Revision history for this message
In , Matthias Klose (doko) wrote :

Created attachment 139
button example

Changed in openjdk-6:
importance: Undecided → Medium
status: Confirmed → Triaged
Changed in openjdk:
status: Unknown → Confirmed
Revision history for this message
In , Mark J. Wielaard (3y9m2vcw-ll9d-fkzsxrqg) wrote :

The attached example doesn't match the screenshots.

Revision history for this message
In , Matthias Klose (doko) wrote :

here the screenshots for the simple example:

wrong (according to bug submitter):
    http://launchpadlibrarian.net/18495058/not-vertically-centered.png

my reproduced screenshot:
    http://launchpadlibrarian.net/18495770/Button.png

ok (with sun java)
    http://launchpadlibrarian.net/18497525/vertically-centered.png

rechecked (wrong) with openjdk by bug submitter:
    http://launchpadlibrarian.net/18556877/iso--8859-15-large-borders.png

Revision history for this message
Klaus Reimer (kay) wrote :

I can also reproduce this problem with OpenJDK 6b12-0ubuntu6 on Intrepid AMD64. sun-java6-fonts is installed.

Attached screen shows the options dialog of current Aqua Data Studio 7.0.10. As you can see in the selected "General" item on the left there is a disturbing bottom margin and the text on the right is not completely visible. The main screen also looks ugly because text lines are much to high.

The locale workaround is working for me. So now I start ADS with this script and text is rendered correctly:

#!/bin/bash
cd /opt/datastudio
export LC_ALL=de_DE.ISO-8859-15
exec ./datastudio.sh

Revision history for this message
Trent McPheron (tiz-ex1) wrote :

Bug persists in Intrepid. I wonder why we only just recently had this problem reported, and only now found the workaround. Is this an Ubuntu-only thing? Do not many people use OpenJDK?

In any case, the workaround does work, except that I tweaked it to be en_US instead of de_DE. I'm attaching two screenshots of Anathema v1.3.1, a program for managing characters in the like for the tabletop game Exalted. One is pre-workaround, and one is post-workaround. I added "export LC_ALL=en_US.ISO-8859-15" in the included anathema.sh right before the line that runs the jar.

I hope a proper fix comes soon. :)

Revision history for this message
Trent McPheron (tiz-ex1) wrote :

characters and the like*. Too bad there's no edit button.

Anyways, here is the good screenshot.

Revision history for this message
IrishBouzouki (jjmurphy) wrote :

I can confirm this, the VASSAL open source java project, which includes a version for linux, has looked at this (well, me and one other person).
(a) note the title of this bug is the exact opposite of the bug... it is not "needs additional vertical space" it is "takes up too much vertical space" and it does seem limited to text labels at least in my experience - for instance if you have a number of supposedly same-height buttons some with text and some with graphics the text ones are stretched vertically to fit the extra blank space.
(b) this is apparently unique to the ubuntu openjdk (or jre) 6... the fedora amd64 version of openjdk6 amd64 could not be tweaked to show the same bug... although this may prove to be incorrect as I did not pass along the info which seems to imply it is locale related as well and the tester for fedora is in a different continent from me.
it is discussed here - http://www.vassalengine.org/forums/viewtopic.php?t=1328 and the posts towards the end are more precise.

Revision history for this message
IrishBouzouki (jjmurphy) wrote :

also, lest the powers that be think this is resolved by a workaround... if the workaround only fixes the vertical offset and not the extra spacing then it is not really a full workaround. a number of programs, like any with vertically aligned buttons mixing text and graphics, use graphics where the extra vertical space occupied by the text label becomes an issue whether it is properly centered or not.

I am a linux noob, forgive me if I am overlooking something obvious here.

Revision history for this message
Fritz Heinrichmeyer (fritz-heinrichmeyer) wrote :

i changed the title of the bug that originated from my weak translation of the german word "brauchen" that can be translated to "to need" and to "to take up" depending on the context.

Revision history for this message
IrishBouzouki (jjmurphy) wrote :

thanks fritz. also, the workaround works.. at least for me (xubuntu 8.10 amd64, openjdk6 amd64 per the latest in the repo)... the extra space is gone.

Revision history for this message
Kevin Waddell (onatawahtaw) wrote :

I also have this problem. I am attaching a screenshot with both the Sun version and OpenJDK as a side-by-side comparison. I am using Ubuntu 8.10 AMD64.

Revision history for this message
Kevin Waddell (onatawahtaw) wrote :

You will also notice if you look closely at the above screenshot that not only is the vertical spacing messed up, but also the horizontal spacing (i.e. there's more space between individual letters in the OpenJDK version which throws the line-wrap off kilter).

Revision history for this message
In , Omajid (omajid) wrote :

(In reply to comment #4)
> ok (with sun java)
> http://launchpadlibrarian.net/18497525/vertically-centered.png
>
> rechecked (wrong) with openjdk by bug submitter:
> http://launchpadlibrarian.net/18556877/iso--8859-15-large-borders.png
>

This particular bug is due to a mistake in the calculation of a window size. The button then expands to fill the entire window. It has been fixed in icedtea6 head: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2009-January/004455.html. The rest of the bugs pointed out on the launchpad page seem unrelated to this one.

Revision history for this message
Matthias Klose (doko) wrote :

fixed in jaunty

Changed in openjdk-6:
importance: Undecided → Medium
status: New → Triaged
importance: Undecided → Medium
status: New → Triaged
status: Triaged → Fix Released
Revision history for this message
In , Matthias Klose (doko) wrote :

fixed.

Changed in openjdk:
status: Confirmed → Fix Released
Revision history for this message
Trent McPheron (tiz-ex1) wrote :

Can Jaunty's version be installed in Intrepid?

Revision history for this message
Carlos Correia (carlos-m16e) wrote :

@Mathias Klose:

The bug persists in Jaunty (with all updates applied)!

It depends on the locale you use, though, as you can see in the picture attached.

From left to right:
1. Sun Java with default locale (pt_PT.UTF-8)

2. OpenJDK6 with default locale (pt_PT.UTF-8)

3. OpenJDK6 with another locale (pt_PT.iso-8859-15)

In all file boxes I typed the same letters ('çá').

Hope this helps ;-)

Revision history for this message
In , Carlos Correia (carlos-m16e) wrote :

As I reported at Launchpad (https://bugs.launchpad.net/ubuntu/+source/openjdk-6/+bug/255983/comments/45) the bug persists in Jaunty (at least, with my locale settings: pt_PT.UTF-8).

Revision history for this message
In , Carlos Correia (carlos-m16e) wrote :

Created attachment 168
The look with Sun Java and OpenJDK

See https://bugs.launchpad.net/ubuntu/+source/openjdk-6/+bug/255983

Changed in openjdk:
status: Fix Released → Confirmed
Revision history for this message
Carlos Correia (carlos-m16e) wrote :

The problem still exists in the latest build, with the same results I mentioned in my latest post...

m16e@m16e-desktop:~$ java -version
java version "1.6.0_0"
OpenJDK Runtime Environment (IcedTea6 1.4) (6b14-0ubuntu17)
OpenJDK Client VM (build 14.0-b08, mixed mode, sharing)

Revision history for this message
Ilmari Vacklin (wolverian) wrote :

Still exists on Jaunty here too, 64-bit. Attaching two screenshots of it.

Revision history for this message
t3r0 (t3r0) wrote :

I can confirm that this bug still exists in up to date Jaunty 32bit

$ java -version
java version "1.6.0_0"
OpenJDK Runtime Environment (IcedTea6 1.4.1) (6b14-1.4.1-0ubuntu7)
OpenJDK Client VM (build 14.0-b08, mixed mode, sharing)
tero@tero-laptop:~$

Revision history for this message
Matthias Klose (doko) wrote :

> Netbeans under OpenJDK6, using the Calibri font from Vista

please recheck using the default fonts in jaunty

> I can confirm that this bug still exists in up to date Jaunty 32bit

which bug? please be specific, what you test and how it can be reproduced!

Revision history for this message
Ilmari Vacklin (wolverian) wrote : Re: [Bug 255983] Re: openjdk label display in swing ui elements takes up too much vertical space

2009/4/20 Matthias Klose <email address hidden>:
>> Netbeans under OpenJDK6, using the Calibri font from Vista
>
> please recheck using the default fonts in jaunty

With the default fonts, I see the increased vertical space as others
have. The font corruption with Calibri should probably be submitted as
a separate bug.

Revision history for this message
Carlos Correia (carlos-m16e) wrote :

Yes. The bug is still in Jaunty, as described above...

Revision history for this message
João Neves (jneves) wrote :

Problem exists in Jaunty. Attached image shows the vertical space.

$ dpkg -l | grep openjdk
ii openjdk-6-jdk 6b14-1.4.1-0ubuntu7 OpenJDK Development Kit (JDK)
ii openjdk-6-jre 6b14-1.4.1-0ubuntu7 OpenJDK Java runtime, using Hotspot JIT
ii openjdk-6-jre-headless 6b14-1.4.1-0ubuntu7 OpenJDK Java runtime, using Hotspot JIT (headless)
ii openjdk-6-jre-lib 6b14-1.4.1-0ubuntu7 OpenJDK Java runtime (architecture independent librarie

Revision history for this message
João Neves (jneves) wrote :
Revision history for this message
Matthias Klose (doko) wrote :

This is a screenshot with a liveDVD, and openjdk-6-jdk installed. This works.

Now please find out which extra fonts are installed and which ones do cause this problem. Maybe remove the extra fonts one by one until you find the font causing the extra alignment.

Revision history for this message
Fritz Heinrichmeyer (fritz-heinrichmeyer) wrote :

@Matthias Klose:
To be shure: The last screenshot is taken with default german utf8 locale? The problem is not observable here with iso-8859-15 locale.

Revision history for this message
Carlos Correia (carlos-m16e) wrote :

@Matthias Klose:

I've tried this steps:

- boot from Jaunty's Kubuntu LiveCD (final release)
- set the language to 'Portuguese' at the boot screen
- installed openjdk (apt-get install openjdk-6-jdk)
- compile app (any swing app - this time I've used http://java.sun.com/docs/books/tutorial/uiswing/examples/components/ButtonDemoProject/src/components/ButtonDemo.java as João Neves did, just to make it simple)

 and the result is exactly the same as in his attachment (https://bugs.launchpad.net/ubuntu/+source/openjdk-6/+bug/255983/comments/52), with the exception of the windows decorations, as I've used KDE)

The locale of the machine is: "pt_PT.UTF-8"...

I believe that now you'll be able to reproduce it, just set your language to Portuguese (or German, as Fritz mentioned) at the boot screen.

Revision history for this message
Carlos Correia (carlos-m16e) wrote :

Surprise!?

As this bug is pissing me off, I rebooted the LiveCD, and the choosed 'English' as language (the default option).

Then I installed openjdk, build the ButtonDemo class, and gave it a try...

The locale of the machine is now "en_US.UTF-8"!

I got *exactly* the same result :-S

Revision history for this message
João Neves (jneves) wrote :

Attached is the same ButtonDemon app as above with openjdk-6 but using the fontconfig.properties file from sun-java6-bin (both in jaunty). It doesn't show the same problem.

Any suggestions on which specific config in this file is breaking openjdk?

Revision history for this message
João Neves (jneves) wrote :

BTW, has this bug anything to do with the following comments on /etc/java-6-free/fontconfig.properties?

# FIXME: why are all the UTF-8 entries needed?
# FIXME: fonts are too high, omit these in sequence.allfonts.UTF-8

Revision history for this message
João Neves (jneves) wrote :

Sorry, I meant /etc/java-6-openjdk/fontconfig.properties

Revision history for this message
João Neves (jneves) wrote :

Deleting the following lines in /etc/java-6-openjdk/fontconfig.properties solves the problem for me:

sequence.allfonts.UTF-8=latin-1,wqy-zenhei,japanese-vlgothic,japanese-kochi,japanese-sazanami,korean-un,korean-baekmuk,bengali,oriya,telugu
sequence.allfonts.UTF-8.ko=latin-1,korean-un,korean-baekmuk
sequence.allfonts.UTF-8.ja=latin-1,japanese-vlgothic,japanese-kochi,japanese-sazanami
sequence.allfonts.UTF-8.zh.CN=latin-1,umingcn,shanheisun,wqy-zenhei
sequence.allfonts.UTF-8.zh.TW=latin-1,umingtw,shanheisun,wqy-zenhei
sequence.allfonts.UTF-8.zh.HK=latin-1,uminghk,shanheisun,wqy-zenhei
sequence.allfonts.UTF-8.zh.SG=latin-1,umingcn,shanheisun,wqy-zenhei

Patch attached. Could someone else verify?

Revision history for this message
João Neves (jneves) wrote :

New testing, I only need to delete one line to have it working:

sequence.allfonts.UTF-8=latin-1,wqy-zenhei,japanese-vlgothic,japanese-kochi,japanese-sazanami,korean-un,korean-baekmuk,bengali,oriya,telugu

Revision history for this message
Carlos Correia (carlos-m16e) wrote :

@João Neves:

I can confirm that (Kubuntu Jaunty). It is enough to delete just that single line :)

Switching back to openjdk on production machine :D

Revision history for this message
t3r0 (t3r0) wrote :

@João Neves:

The patch fixes this issue for me. Thank you!

Revision history for this message
Julien Aubin (gojulgarbmail) wrote :

The fix also works there, thank you !

Revision history for this message
Julien Aubin (gojulgarbmail) wrote :

Another workaround consists in launching all the Java program with the -Dsun.desktop=gnome parameter just between the "java" command and your program usual parameters.

"-".

Revision history for this message
João Neves (jneves) wrote :

Just changed the status, as the previous fix does not fix the problem.

Changed in openjdk-6 (Ubuntu):
status: Fix Released → Confirmed
Matthias Klose (doko)
Changed in openjdk-6 (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Olivier Samyn (olivier-oleastre) wrote :

Just lost some hours trying to get this working on my Jaunty installation.

I also found that modifying the fontconfig.properties file resolved the problem.
I'm currently using fr_BE.UTF-8 as my locale.

The remaining problem does not come from some bug in the jdk, but only the UTF-8 fonts configuration.

The fontconfig.properties file contains the following line:
sequence.allfonts.UTF-8=latin-1,wqy-zenhei,japanese-vlgothic,japanese-kochi,japanese-sazanami,korean-un,korean-baekmuk,bengali,oriya,telugu
If you remove the last three groups it solves the problem.

It seems the openjdk code tries to get a maximum character size, and since the bengali,oriya,telugu characters takes more vertical space than latin-1 one, the global vertical space is increased.

For info, Sun's jdk (as seen in the sun-java6-jdk package) does not include those fonts.

I did not searched who is responsible of this fontconfig.properties file Ubuntu, Debian or upstream, but either there is a more compact font for those languages, or they should be removed from the list (as other languages like hindi, tamil, ...)

Revision history for this message
In , Jon-vanalten (jon-vanalten) wrote :

Cleaning up some stale bug reports.

After reading the long thread at the launchpad bug noted above, it seems that those still having problems found a resolution:

"The remaining problem does not come from some bug in the jdk, but only the UTF-8 fonts configuration.

The fontconfig.properties file contains the following line:
sequence.allfonts.UTF-8=latin-1,wqy-zenhei,japanese-vlgothic,japanese-kochi,japanese-sazanami,korean-un,korean-baekmuk,bengali,oriya,telugu
If you remove the last three groups it solves the problem."

I suppose this means this is truly fixed? Can you confirm that this is no longer a problem for you Carlos?

Revision history for this message
In , Carlos Correia (carlos-m16e) wrote :

(In reply to comment #9)
> After reading the long thread at the launchpad bug noted above, it seems that
> those still having problems found a resolution:
>
> "The remaining problem does not come from some bug in the jdk, but only the
> UTF-8 fonts configuration.
>
> The fontconfig.properties file contains the following line:
> sequence.allfonts.UTF-8=latin-1,wqy-zenhei,japanese-vlgothic,japanese-kochi,japanese-sazanami,korean-un,korean-baekmuk,bengali,oriya,telugu
> If you remove the last three groups it solves the problem."
>
> I suppose this means this is truly fixed? Can you confirm that this is no
> longer a problem for you Carlos?
>

Yes! At least, using locale "pt_PT.UTF-8", the problem disappears as soon as that line is commented.

Changed in openjdk:
status: Confirmed → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote :

A proposed fix for this was uploaded to jaunty-proposed 6 weeks ago. Unfortunately this happened by foregoing the SRU process, so it got overlooked:

openjdk-6 (6b14-1.4.1-0ubuntu10) jaunty-proposed; urgency=low

  [ Skipping release numbers accidentally used for test builds ]

  * Remove all UTF-8 sequence definitions from the font configuration.
    LP: #255983.
  * Fix issues in the IcedTea plugin, updating to IcedTea 1.5:
    - Freeze with empty string return from Java side.
    - Handling of nested jar archive files.
    - Use custom authenticator for javaws, so that it can handle SSL sites
      correctly.
    - Forgo permission check if JS source is [System] (i.e. Mozilla
      extension/chrome).
  * Apply missing pulseaudio bounds checking patch to 1.4.1.
  * Fix problem with the ARM assembler interpreter, when executing a 'new'
    bytecode with a double on the top of the stack (Edward Nevill).
  * README.Debian: Document using the different VM's.

 -- Matthias Klose < <email address hidden>> Sat, 16 May 2009 19:31:12 +0200

Please test the version in jaunty-proposed. Apart from this bug, please also test whether sound integration still works (since this changes the pulseaudio related code), and for regressions in the mozilla/firefox Java plugin, by exercising some Java applets.

Thank you!

Changed in openjdk-6 (Ubuntu Jaunty):
status: New → Fix Committed
Revision history for this message
Olivier Samyn (olivier-oleastre) wrote :

I did not already had a look at the new package, but is removing all the UTF-8 sequences necessary ?

I mean, just replacing the old one (as I said here above):
sequence.allfonts.UTF-8=latin-1,wqy-zenhei,japanese-vlgothic,japanese-kochi,japanese-sazanami,korean-un,korean-baekmuk,bengali,oriya,telugu

with:
sequence.allfonts.UTF-8=latin-1,wqy-zenhei,japanese-vlgothic,japanese-kochi,japanese-sazanami,korean-un,korean-baekmuk

is sufficient to get it working correctly.

Revision history for this message
Matthias Klose (doko) wrote :

> Apart from this bug, please also test whether sound integration still works
> (since this changes the pulseaudio related code)

 - it still passes the sound tests in the testsuite

> and for regressions in the mozilla/firefox Java plugin, by exercising some Java applets.

applets still work, there is currently no testsuite for applets.

and the arm build can be used to build openjdk-6 again.

Revision history for this message
Ilmari Vacklin (wolverian) wrote :

> Please test the version in jaunty-proposed.

Worksforme.

Revision history for this message
Martin Pitt (pitti) wrote :

> I did not already had a look at the new package, but is removing all the UTF-8 sequences necessary ?

Matthias?

Revision history for this message
Martin Pitt (pitti) wrote :

Tested by Matthias. We discussed the UTF-8 sequences removal; it apparently was a misunderstanding back then when it was introduced; removing them fixes metrics calculation.

tags: added: verification-done
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package openjdk-6 - 6b14-1.4.1-0ubuntu10

---------------
openjdk-6 (6b14-1.4.1-0ubuntu10) jaunty-proposed; urgency=low

  [ Skipping release numbers accidentally used for test builds ]

  * Remove all UTF-8 sequence definitions from the font configuration.
    LP: #255983.
  * Fix issues in the IcedTea plugin, updating to IcedTea 1.5:
    - Freeze with empty string return from Java side.
    - Handling of nested jar archive files.
    - Use custom authenticator for javaws, so that it can handle SSL sites
      correctly.
    - Forgo permission check if JS source is [System] (i.e. Mozilla
      extension/chrome).
  * Apply missing pulseaudio bounds checking patch to 1.4.1.
  * Fix problem with the ARM assembler interpreter, when executing a 'new'
    bytecode with a double on the top of the stack (Edward Nevill).
  * README.Debian: Document using the different VM's.

 -- Matthias Klose <email address hidden> Sat, 16 May 2009 19:31:12 +0200

Changed in openjdk-6 (Ubuntu Jaunty):
status: Fix Committed → Fix Released
Revision history for this message
Alex Valavanis (valavanisalex) wrote :

Intrepid Ibex reached end-of-life on 30 April 2010 so I am closing the report. The bug has been fixed in newer releases of Ubuntu.

Changed in openjdk-6 (Ubuntu Intrepid):
status: Triaged → Invalid
Changed in openjdk:
importance: Unknown → Medium
Revision history for this message
Rolf Leggewie (r0lf) wrote :

Hardy has seen the end of its life and is no longer receiving any updates. Marking the Hardy task for this ticket as "Won't Fix".

Changed in openjdk-6 (Ubuntu Hardy):
status: Triaged → Won't Fix
To post a comment you must log in.