← Back to team overview

openjdk team mailing list archive

[Bug 937200] Re: Fat fonts in Swing applications

 

@Matthias Klose:
> fonts-unfonts-core advertises a font which it doesn't support
How do you know that?

So far I could reliably reproduce that removing at least one of the following fonts fixes the probem: UnBatangBold, UnDotum (both in /usr/share/fonts/truetype/unfonts-core).
Note that you have to wait a few seconds for fontconfig(?) to recognize the removal of a font file.

If a JDK fontconfig file as in comment #48 should be used to fix this bug, make sure all font paths are right, e.g. in #48 the unfonts path is wrong.
The following line of "fontconfig.Ubuntu.properties.src" from #48 is the one that fixes the bug at least in simple test cases:
filename.-dejavu-dejavu_serif-medium-r-normal--*-%d-*-*-p-*-iso10646-1=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif.ttf
You can compile and install the src file e.g. via:
java -jar /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/compilefontconfig.jar ./fontconfig.Ubuntu.properties.src ./fontconfig.Ubuntu.bfc
sudo cp ./fontconfig.Ubuntu.bfc /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/

I have attached a simple test case. If the bug appears, it will output
"Ubuntu Bold", otherwise just "Ubuntu".

I have also checked if the commit http://bazaar.launchpad.net/~ubuntu-
branches/ubuntu/raring/fonts-unfonts-core/raring/revision/5 introduced
this bug, though this is not the case.

** Attachment added: "command line test case"
   https://bugs.launchpad.net/ubuntu/+source/openjdk-7/+bug/937200/+attachment/3908022/+files/TestCase.java

-- 
You received this bug notification because you are a member of OpenJDK,
which is subscribed to openjdk-7 in Ubuntu.
https://bugs.launchpad.net/bugs/937200

Title:
  Fat fonts in Swing applications

Status in “fonts-unfonts-core” package in Ubuntu:
  Triaged
Status in “openjdk-7” package in Ubuntu:
  Invalid

Bug description:
  Since I upgraded to Ubuntu 12.04 I noticed that the fonts in Java
  Swing applications use the bold font weight. This looks really ugly
  and takes up to much space.

  
  1.
  lsb_release -rd
  Description:	Ubuntu precise (development branch)
  Release:	12.04

  
  2. 
  apt-cache policy openjdk-7-jdk 
  openjdk-7-jdk:
    Installiert: 7~b147-2.0-1ubuntu2
    Kandidat:    7~b147-2.0-1ubuntu2
    Versionstabelle:
   *** 7~b147-2.0-1ubuntu2 0
          500 http://archive.ubuntu.com/ubuntu/ precise/universe amd64 Packages
          100 /var/lib/dpkg/status

  3. 
  Applications rendering with normal fonts

  4.
  Applications rendering with bold fonts

  ProblemType: Bug
  DistroRelease: Ubuntu 12.04
  Package: openjdk-7-jdk 7~b147-2.0-1ubuntu2
  ProcVersionSignature: Ubuntu 3.2.0-17.26-generic 3.2.6
  Uname: Linux 3.2.0-17-generic x86_64
  NonfreeKernelModules: nvidia
  ApportVersion: 1.92-0ubuntu1
  Architecture: amd64
  Date: Mon Feb 20 20:44:43 2012
  InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release amd64 (20101007)
  SourcePackage: openjdk-7
  UpgradeStatus: Upgraded to precise on 2012-02-16 (3 days ago)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/fonts-unfonts-core/+bug/937200/+subscriptions


References