Gnome-specimen displays same specimen for Ubuntu Medium and Ubuntu Bold

Bug #813373 reported by Paul Sladen
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Gnome Specimen
New
Undecided
Unassigned
gnome-specimen (Ubuntu)
Triaged
Low
Unassigned

Bug Description

Mark Shuttleworth noticed that Gnome-Specimen gets confused between different weights of the same font, displaying the wrong one. For a font-testing/specimen program this is sub-optimal.

This will likely turn out to be related to bug #744812 ("FontConfig/Qt stack choke on Ubuntu Medium font meta-data (No medium in Inkscape and too bold in Qt apps)"), but provides a nice, easy, reproducible test-case using the advanced multi-weight typeface available in:

   http://apt.ubuntu.com/p/ttf-ubuntu-font-family or:
   http://font.ubuntu.com/

To reproduce:

  1. Select and expand "Ubuntu" from the list of font family names
  2. Choose "Medium"
  3. Choose "Bold"

What happens:

  3. For both Ubuntu Medium and Ubuntu Bold the same specimen is displayed

What should happen:

  3. Medium should show a specimen for Ubuntu Medium, and Bold should show a specimen for Ubuntu Bold.

Paul Sladen (sladen)
description: updated
Revision history for this message
BubuXP (bubuxp) wrote :

No news on this?
For me the bug lies in the fonts properties.
Doing for example:
$ fc-query /usr/share/fonts/truetype/ubuntu-font-family/Ubuntu-M.ttf

the Medium variant (and the Light also) report double values on some properties, like this:

family: "Ubuntu"(s) "Ubuntu Medium"(s)
familylang: "en"(s) "en"(s)
style: "Medium"(s) "Bold"(s)
stylelang: "en"(s) "en"(s)
fullname: "Ubuntu Medium"(s)
fullnamelang: "en"(s)
slant: 0(i)(s)
weight: 100(i)(s)

I don't know what the '(s)' stands for.
Probably that 'Bold' on the style property is misinterpreted by some programs, that cannot distinguish between this and the true Bold, using only the first (or last) variant read, that seems to be "Medium".

This is an example how Helvetica Neue sets those properties:

family: "Helvetica Neue"(s)
style: "中黑"(s) "Medium"(s) "Halbfett"(s) "Moyen"(s) "Medio"(s) "ミディアム"(s) "중간체"(s) "Médio"(s) "Средний"(s) "Medel"(s) "中等"(s) "متوسط"(s) "Media"(s)
stylelang: "zh-tw"(s) "da"(s) "de"(s) "fr"(s) "it"(s) "ja"(s) "ko"(s) "pt"(s) "ru"(s) "sv"(s) "zh-cn"(s) "ar"(s) "es"(s)
slant: 0(i)(s)
weight: 100(i)(s)

It declares only one family, and various styles seems to correspond to various languages. I can see correctly each variant this way (in the few programs that I use), but he suffers bug #744812 too (like probably every font family that has more than 5 variants or doesn't set the 'weight' property the way Qt requires).

While waiting for a fix, I workaround-ed this problem with fontconfig (file attached), moving the Light and Medium variants in a new family called "Ubuntu Light", where Medium is the 'Light Bold'.
This way Regular and Bold are listed under "Ubuntu" family, while Light and Medium are listed under "Ubuntu Light" family, and each variant shows up correctly.
But it's only a "concept patch", as this workaround probably needs more fine-tuning (for example, the involved fonts name in Gimp are a bit weird).

Changed in gnome-specimen (Ubuntu):
status: New → Triaged
importance: Undecided → Low
Revision history for this message
BubuXP (bubuxp) wrote :

My workaround worked for months without issues (at least for me):
https://bugs.launchpad.net/ubuntu-font-family/+bug/744812/comments/81
After placing the conf file in the proper directory, the font cache must be refreshed to see the results (I use "fc-cache -fv" both as user and super-user).
I used successfully this "technique" with other annoying fonts too, as Roboto ( https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=733077#20 ) and Nimbus Sans ( http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=645876#10 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=645876#17 ).
It's basically reassigning the wrong hard-coded font properties with the correct ones using fontconfig. If adding other fontconfig configuration files is not the preferred way, the other way I can only see is to edit the font properties directly into the ttf/otf files.

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.