bold font rendeing in Java is broken in Cosmic with OpenJDK 11

Bug #1799014 reported by Václav Haisman
26
This bug affects 3 people
Affects Status Importance Assigned to Milestone
openjdk-11 (Debian)
Fix Released
Unknown
openjdk-lts (Ubuntu)
Fix Released
Medium
Tiago Stürmer Daitx
Bionic
Fix Released
Medium
Unassigned
Cosmic
Fix Released
Medium
Unassigned

Bug Description

Since update to Cosmic, I see that bold fonts in Java have broken rendering. See attached 400% scaled PNG for illustration. The 'r' in bold rendering of "Hello World" shows basically a vertical line from the end of the hook end. I am not entirely sure this is freetype issue but some sources (https://github.com/adobe/brackets/issues/14290) suggest there is a bug in the 2.8.1 version that Cosmic seems to install (libfreetype6/cosmic,now 2.8.1-2ubuntu2 amd64 [installed]).

Revision history for this message
Václav Haisman (vzeman79) wrote :
tags: added: cosmic
Revision history for this message
Václav Haisman (vzeman79) wrote :
affects: openjdk-lts (Ubuntu) → openjdk
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in freetype (Ubuntu):
status: New → Confirmed
Revision history for this message
Václav Haisman (vzeman79) wrote :

Here is a small test application that shows the issue.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in openjdk-lts (Ubuntu):
status: New → Confirmed
affects: openjdk → openjdk-lts (Ubuntu)
Revision history for this message
Thorsten Glaser (mirabilos) wrote :

The testcase needs the “package test;” in the first line removed / commented-out, then it works.

This works in 11.0.1+13-2 on Debian sid, as a new data point.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in openjdk-lts (Ubuntu):
status: New → Confirmed
Revision history for this message
Laurent Bonnaud (laurent-bonnaud) wrote :

The bug has been fixed in Debian just by removing a patch:

 openjdk-11 (11~28-3) unstable; urgency=medium
 .
   * Drop the jdk-freetypeScaler-crash patch. Closes: #905718.

Changed in openjdk-11 (Debian):
status: Unknown → Fix Released
Revision history for this message
Sebastien Bacher (seb128) wrote :

@Laurent, that changes is supposed to be in the cosmic version of the package though
https://launchpad.net/ubuntu/+source/openjdk-lts/11~28-3ubuntu1

"openjdk-lts (11~28-3ubuntu1) cosmic; urgency=medium

  * Sync packages with 11~28-3."

The debian bug also states that updating openjdk didn't fix the issue but updating other gtk pacakges did (without specific on which one could have fixed the issue)

Revision history for this message
Laurent Bonnaud (laurent-bonnaud) wrote :

> updating other gtk pacakges did [fix the issue]

Indeed.

I confirm that on my Debian sid+experimental system, fonts look OK in openjdk-11.

I tried to investigate the problem in Ubuntu cosmic by first trying to determine which fonts are used by the JRE. I used this command:

  cat /proc/$(pidof java)/maps | grep font

and only found files from /var/cache/fontconfig/ and no actual font files.
Other applications have files from /usr/share/fonts/, but not the JRE.
Without this I do not know where to look further :<...

Revision history for this message
md_5 (md-5) wrote :

Yeah its still an issue with 11.0.1+13-2ubuntu1, and also the upstream release https://jdk.java.net/11/

freetype has been causing such issues in the last year or so....

Revision history for this message
md_5 (md-5) wrote :

Stealing libfreetype6 2.9.1-3 from Debian and installing it make the rendering passable again.
Not subjectively 100% as good as Java 8, but fine enough to get used to.

Revision history for this message
Matthias Bläsing (mblaesing) wrote :

I still see font distortions on ubuntu cosmic:

openjdk version "11.0.1" 2018-10-16
OpenJDK Runtime Environment (build 11.0.1+13-Ubuntu-2ubuntu1)
OpenJDK 64-Bit Server VM (build 11.0.1+13-Ubuntu-2ubuntu1, mixed mode, sharing)

There is a matching upstream issue for this:

http://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8214284

In the comments for that issue, a second (fixed) issue is referenced:

https://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8214002

The fix for that issue was merged to the jdk 12 and jdk branches:

http://hg.openjdk.java.net/jdk/jdk12/rev/7ed5edf6ba0c
http://hg.openjdk.java.net/jdk/jdk/rev/7ed5edf6ba0c

I build the jdk branch and found the issue fixed. I also rebuild the ubuntu package with the above mentioned patch included (only the change in freetypeScaler.c, not the new test) and also found, that this fixes my problem.

I don't know the plans for java in ubuntu regarding LTS releases and patch backports, but it would be great if you could include the patch. For the record: I did not write that patch, it is the referenced changeset above, modified to be applied while building the ubuntu package.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "font-fix.diff" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
tags: added: rls-cc-incoming
Changed in openjdk-lts (Ubuntu):
assignee: nobody → Tiago Stürmer Daitx (tdaitx)
Revision history for this message
Matthias Klose (doko) wrote :

fixed in 11.0.2 in disco.

Changed in openjdk-lts (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Sebastien Bacher (seb128) wrote :

> fixed in 11.0.2 in disco.

no, it's not

openjdk-lts-11.0.2+9$ grep 'int renderFlags =' * -r
src/java.desktop/share/native/libfontmanager/freetypeScaler.c: int renderFlags = FT_LOAD_RENDER, target;

see http://hg.openjdk.java.net/jdk/jdk12/rev/7ed5edf6ba0c if the fix was included it should be FT_LOAD_DEFAULT

Changed in openjdk-lts (Ubuntu):
status: Fix Released → New
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package openjdk-lts - 11.0.2+9-3ubuntu1

---------------
openjdk-lts (11.0.2+9-3ubuntu1) disco; urgency=medium

  * Sync packages with 11.0.2+9-3:
    - Fix Zero on sparc64 (Adrian Glaubitz). Closes: #920315.
    - Link zero on alpha with --no-relax (Michael Cree). Addresses: #920161.
    - Don't run the tests on alpha, causing build failure.
    - jhsdb isn't built on alpha.
    - Backport the fix for 8214002 (cannot use italic font style if the font
      has embedded bitmap). LP: #1799014.
  * Sync packages with 11.0.2+9-2:
    - Fix file permissions for autopkg tests.

 -- Matthias Klose <email address hidden> Thu, 24 Jan 2019 15:14:20 +0100

Changed in openjdk-lts (Ubuntu):
status: New → Fix Released
Changed in freetype (Ubuntu):
status: Confirmed → Invalid
Changed in freetype (Ubuntu Bionic):
status: New → Invalid
Changed in freetype (Ubuntu Cosmic):
status: New → Invalid
Mathew Hodson (mhodson)
no longer affects: freetype (Ubuntu)
no longer affects: freetype (Ubuntu Bionic)
no longer affects: freetype (Ubuntu Cosmic)
Changed in openjdk-lts (Ubuntu):
importance: Undecided → Medium
Changed in openjdk-lts (Ubuntu Bionic):
importance: Undecided → Medium
Changed in openjdk-lts (Ubuntu Cosmic):
importance: Undecided → Medium
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello Václav, or anyone else affected,

Accepted openjdk-lts into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/openjdk-lts/11.0.2+9-3ubuntu1~18.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in openjdk-lts (Ubuntu Bionic):
status: New → Fix Committed
tags: added: verification-needed verification-needed-bionic
Revision history for this message
Václav Haisman (vzeman79) wrote :

I have filed this defect against 18.10, not 18.04 though. Bionic fix is useless for me.

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

looks fine in bionic-proposed

tags: added: verification-done verification-done-bionic
removed: verification-needed verification-needed-bionic
Revision history for this message
Brian Murray (brian-murray) wrote : Reminder of SRU verification policy change

Thank you for taking the time to verify this stable release fix. We have noticed that you have used the verification-done tag for marking the bug as verified and would like to point out that due to a recent change in SRU bug verification policy fixes now have to be marked with per-release tags (i.e. verification-done-$RELEASE). Please remove the verification-done tag and add one for the release you have tested the package in. Thank you!

https://wiki.ubuntu.com/StableReleaseUpdates#Verification

tags: removed: verification-done
Revision history for this message
Laurent Bonnaud (laurent-bonnaud) wrote :

In cosmic with this version:

  Package: openjdk-11-jdk-headless
  Version: 11.0.2+9-3ubuntu1~18.04.1

the bug is fixed. Thanks!

Changed in openjdk-lts (Ubuntu Cosmic):
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (5.7 KiB)

This bug was fixed in the package openjdk-lts - 11.0.2+9-3ubuntu1~18.04.3

---------------
openjdk-lts (11.0.2+9-3ubuntu1~18.04.3) bionic-security; urgency=medium

  * Backport from Disco. LP: #1814133.
  * Revert to GTK2 as default as GTK3 still has padding and component issues,
    apply upstream changeset to fix a few GTK3 components: LP: #1770278.
    - debian/patches/jdk-improve-gtk3-compatibility.patch: upstream fix for
      JDK-8218469, JDK-8218470, JDK-8218472, and JDK-8203627.
    - debian/patches/keep-gtk2-as-default.patch: revert upstream so GTK2 is
      loaded before GTK3 when available.
    - debian/rules, debian/control: remove libgtk-3-dev from build depends
      as it is not required for building; set jre to depend on libgtk2.0-0
      and alternatively to libgtk-3-0.
  * Adds breaks clause to prevent openjdk-11-jre-headless from being updated
    when jetty9, netbeans, tomcat8, or visualvm are being hold back in
    unattended-upgrades due to local conffiles changes.

openjdk-lts (11.0.2+9-3ubuntu1) disco; urgency=medium

  * Sync packages with 11.0.2+9-3:
    - Fix Zero on sparc64 (Adrian Glaubitz). Closes: #920315.
    - Link zero on alpha with --no-relax (Michael Cree). Addresses: #920161.
    - Don't run the tests on alpha, causing build failure.
    - jhsdb isn't built on alpha.
    - Backport the fix for 8214002 (cannot use italic font style if the font
      has embedded bitmap). LP: #1799014.
  * Sync packages with 11.0.2+9-2:
    - Fix file permissions for autopkg tests.

openjdk-lts (11.0.2+9-1ubuntu3) disco; urgency=medium

  * Fix file permissions for autopkg tests.

openjdk-lts (11.0.2+9-1ubuntu1) disco; urgency=medium

  * Sync packages with 11.0.2+9-1:
    - OpenJDK 11.0.2 release (build 9).

    - Backport the fix for S8212233. Closes: #920020, #919798.
    - debian/buildwatch.sh: use same code from openjdk-8.
    - debian/control.in, debian/control:
      - add fixed build depends for jtreg and xfvb.
      - remove Conflicts: oracle-java11-installer. (LP: #1782630)
    - debian/rules:
      - call the same testsuites scripts used for autopkgtest.
      - removed jtreg and xvfb build dependency logic and moved the bdeps
        into debian/control.in.
      - added gen-autopackage rule to generate autopkgtest scripts from
        templates.
      - copy flight recorder configuration files.
      - fix logging in langtools testing.
      - don't ignore/exclude the release file from the jdk package, it is
        required by jtreg tests and autopkgtests will fail without it.
      - don't run nashorn testsuite.
    - update dep8 tests:
      - debian/tests/control: updated to run openjdk-11 tests.
      - debian/tests/hotspot, debian/tests/jaxp, debian/tests/jdk,
        debian/tests/langtools: use the new jt .sh scripts.
      - debian/tests/jtdiff-autopkgtest.sh: diff build time and autopkgtest
        JTreports to show what changed.
      - debian/tests/jtreg-autopkgtest.in: template to generate the jtreg
        script used by the autopkgtest tests.
      - debian/tests/jtdiff-autopkgtest.sh: used by the scripts to report
        any differences between the autopkgtest and the tests results
        genera...

Read more...

Changed in openjdk-lts (Ubuntu Bionic):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (3.9 KiB)

This bug was fixed in the package openjdk-lts - 11.0.2+9-3ubuntu1~18.10.3

---------------
openjdk-lts (11.0.2+9-3ubuntu1~18.10.3) cosmic-security; urgency=medium

  * Backport from Disco. LP: #1814133.
  * Revert to GTK2 as default as GTK3 still has padding and component issues,
    apply upstream changeset to fix a few GTK3 components: LP: #1770278.
    - debian/patches/jdk-improve-gtk3-compatibility.patch: upstream fix for
      JDK-8218469, JDK-8218470, JDK-8218472, and JDK-8203627.
    - debian/patches/keep-gtk2-as-default.patch: revert upstream so GTK2 is
      loaded before GTK3 when available.
    - debian/rules, debian/control: remove libgtk-3-dev from build depends
      as it is not required for building; set jre to depend on libgtk2.0-0
      and alternatively to libgtk-3-0.
  * Add breaks clause to prevent openjdk-11-jre-headless from being updated
    when jetty9, netbeans, tomcat8, or visualvm are being hold back in
    unattended-upgrades due to local conffiles changes.

openjdk-lts (11.0.2+9-3ubuntu1) disco; urgency=medium

  * Sync packages with 11.0.2+9-3:
    - Fix Zero on sparc64 (Adrian Glaubitz). Closes: #920315.
    - Link zero on alpha with --no-relax (Michael Cree). Addresses: #920161.
    - Don't run the tests on alpha, causing build failure.
    - jhsdb isn't built on alpha.
    - Backport the fix for 8214002 (cannot use italic font style if the font
      has embedded bitmap). LP: #1799014.
  * Sync packages with 11.0.2+9-2:
    - Fix file permissions for autopkg tests.

openjdk-lts (11.0.2+9-1ubuntu3) disco; urgency=medium

  * Fix file permissions for autopkg tests.

openjdk-lts (11.0.2+9-1ubuntu1) disco; urgency=medium

  * Sync packages with 11.0.2+9-1:
    - OpenJDK 11.0.2 release (build 9).

    - Backport the fix for S8212233. Closes: #920020, #919798.
    - debian/buildwatch.sh: use same code from openjdk-8.
    - debian/control.in, debian/control:
      - add fixed build depends for jtreg and xfvb.
      - remove Conflicts: oracle-java11-installer. (LP: #1782630)
    - debian/rules:
      - call the same testsuites scripts used for autopkgtest.
      - removed jtreg and xvfb build dependency logic and moved the bdeps
        into debian/control.in.
      - added gen-autopackage rule to generate autopkgtest scripts from
        templates.
      - copy flight recorder configuration files.
      - fix logging in langtools testing.
      - don't ignore/exclude the release file from the jdk package, it is
        required by jtreg tests and autopkgtests will fail without it.
      - don't run nashorn testsuite.
    - update dep8 tests:
      - debian/tests/control: updated to run openjdk-11 tests.
      - debian/tests/hotspot, debian/tests/jaxp, debian/tests/jdk,
        debian/tests/langtools: use the new jt .sh scripts.
      - debian/tests/jtdiff-autopkgtest.sh: diff build time and autopkgtest
        JTreports to show what changed.
      - debian/tests/jtreg-autopkgtest.in: template to generate the jtreg
        script used by the autopkgtest tests.
      - debian/tests/jtdiff-autopkgtest.sh: used by the scripts to report
        any differences between the autopkgtest and the tests results
        generat...

Read more...

Changed in openjdk-lts (Ubuntu Cosmic):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.