Making some progress on this. I think the bug is present whether or not
fonts-unfonts-core is installed, just the behaviour is different. I'm
working on trusty right now and source code references are from
openjdk-7-source 7u45-2.4.3-4ubuntu2.

Output of the attached testcase when fonts-unfonts-core is not
installed:

Font family: Ubuntu plain=** TrueType Font: Family=Ubuntu Name=Ubuntu
style=0 fileName=/usr/share/fonts/truetype/ubuntu-font-
family/Ubuntu-R.ttf bold=null italic=null bolditalic=** TrueType Font:
Family=Ubuntu Name=Ubuntu Bold Italic style=3
fileName=/usr/share/fonts/truetype/ubuntu-font-family/Ubuntu-BI.ttf

and when fonts-unfonts-core is installed:

Font family: Ubuntu plain=null bold=** TrueType Font: Family=Ubuntu
Name=Ubuntu Bold style=1 fileName=/usr/share/fonts/truetype/ubuntu-font-
family/Ubuntu-B.ttf italic=** TrueType Font: Family=Ubuntu Name=Ubuntu
Italic style=2 fileName=/usr/share/fonts/truetype/ubuntu-font-family
/Ubuntu-RI.ttf bolditalic=** TrueType Font: Family=Ubuntu Name=Ubuntu
Bold Italic style=3 fileName=/usr/share/fonts/truetype/ubuntu-font-
family/Ubuntu-BI.ttf

We should be seeing all four styles present in either case, because ttf-
ubuntu-font-family does provide all of them. The code that returns the
bold style as a fallback when plain is null is at
SunFontManager.java:2140.

What I'm seeing is that some but not all styles of the Ubuntu family are
registered earlier with rank 2. The missing styles are seen later at
rank 3, but rejected (SunFontManager.java:766). (There might be more
than one bug here... is it just me or is the test on that line
backwards?) I haven't figured out yet why some styles are seen at
different times.

I will keep digging :) but the time I can spend on this is limited...
any help is more than welcome!

** Attachment added: "TestCase.java"
   
https://bugs.launchpad.net/ubuntu/+source/openjdk-7/+bug/937200/+attachment/3939929/+files/TestCase.java

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

Title:
  Fat fonts in Swing applications

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

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to