fontconfig confuses bold and medium weights

Bug #746383 reported by Conscious User
26
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Fontconfig
Fix Released
Medium
Pango
Fix Released
Medium
fontconfig (Ubuntu)
Triaged
Medium
Unassigned
pango (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

Attempts to set "Ubuntu Bold" in the Appearance settings fall back to "Ubuntu Medium". In fact, in the font selection screen there seems to be no difference between bold and medium.

Curiously enough, Bug #746382 sort of proves that Ubuntu Bold *is* installed and accessible.

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: ttf-ubuntu-font-family 0.71.2-0ubuntu1
ProcVersionSignature: Ubuntu 2.6.38-7.39-generic 2.6.38
Uname: Linux 2.6.38-7-generic i686
Architecture: i386
Date: Thu Mar 31 08:33:44 2011
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Alpha i386 (20110325)
ProcEnviron:
 LANGUAGE=en_US:en
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: ubuntu-font-family-sources
UpgradeStatus: No upgrade log present (probably fresh install)

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

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

Changed in ubuntu-font-family-sources (Ubuntu):
status: New → Confirmed
Revision history for this message
In , Kanru-d (kanru-d) wrote :

Recently Adobe & Google released a open-source pan-CJK font, Source Han Sans from Adobe or Noto Sans CJK from Google.

This font family features 7 font weights: ExtraLight, Light, Normal, Regular, Meidum, Bold, Heavy and their os2 weight are: 100, 300, 350, 400, 500, 700, 900 respectively.

However, in fontconfig, os2 weight class 350 and 400 both maps to weight 80 and I think this makes fontconfig or pango confuse about how to choose the default font.

In particular in the GktFontChooser user can't choose one of these fonts. To fix this we probably also have to fix Pango.

This issue is also reported to the source-han-sans project: https://github.com/adobe-fonts/source-han-sans/issues/5

Revision history for this message
In , Freedesktop (freedesktop) wrote :

I believe this is a Pango limitation, not fontconfig. I'll take a look.

Revision history for this message
Adolfo Jayme Barrientos (fitojb) wrote :

It’s sad that this report was misfiled (to the wrong package, that is), so it went unnoticed for so long.

This is not a bug specific to the Ubuntu fonts. fontconfig does not deal well with multiple weights.

It’s already filed in the upstream tracker.

affects: ubuntu-font-family-sources (Ubuntu) → fontconfig (Ubuntu)
Changed in fontconfig (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Triaged
summary: - Cannot set "Ubuntu Bold" in Appearance settings
+ fontconfig confuses bold and medium weights
Changed in fontconfig:
importance: Unknown → Medium
status: Unknown → Confirmed
Revision history for this message
In , Freedesktop (freedesktop) wrote :

My bad, this *is* a fontconfig issue. Investigating.

Revision history for this message
In , Freedesktop (freedesktop) wrote :

Fontconfig part fixed. Pango fix needed.

commit ffda7c0e8130eb107ecbb3bdc48043093b12dff9
Author: Behdad Esfahbod <email address hidden>
Date: Fri Jul 25 17:59:26 2014 -0400

    Linearly interpolate weight values

    Rest of Part of https://bugs.freedesktop.org/show_bug.cgi?id=81453

    Adds new API:

        FcWeightFromOpenType()
        FcWeightToOpenType()

commit bf9df5ada77469f57101851f6b4e279a4a5ea087
Author: Behdad Esfahbod <email address hidden>
Date: Fri Jul 25 18:07:10 2014 -0400

    Change DemiLight from 65 to 55

    Such that Regular is closer to Medium than to DemiLight

commit be6506ca04ccce10868a8cd51d89e586284d149b
Author: Behdad Esfahbod <email address hidden>
Date: Fri Jul 25 16:24:26 2014 -0400

    Add FC_WEIGHT_DEMILIGHT

    Part of https://bugs.freedesktop.org/show_bug.cgi?id=81453
    Also hooks up FC_WEIGHT_BOOK to fcfreetype.c.

Revision history for this message
In , Freedesktop (freedesktop) wrote :
Changed in pango (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
Changed in pango:
importance: Unknown → Medium
status: Unknown → Confirmed
Revision history for this message
In , Freedesktop (freedesktop) wrote :

Pango fixed. See screenshots here: https://bugzilla.gnome.org/show_bug.cgi?id=733764

Changed in pango:
status: Confirmed → Fix Released
Changed in fontconfig:
status: Confirmed → Fix Released
Revision history for this message
In , Daphnediane (daphnediane) wrote :

(In reply to comment #3)
> Fontconfig part fixed. Pango fix needed.
>
> commit ffda7c0e8130eb107ecbb3bdc48043093b12dff9
> Author: Behdad Esfahbod <email address hidden>
> Date: Fri Jul 25 17:59:26 2014 -0400
>
> Linearly interpolate weight values
>
> Rest of Part of https://bugs.freedesktop.org/show_bug.cgi?id=81453
>
> Adds new API:
>
> FcWeightFromOpenType()
> FcWeightToOpenType()

Note that this fix introduced bug 82228 as lerp doesn't handle dy == 0.

Revision history for this message
In , Freedesktop (freedesktop) wrote :

*** Bug 94505 has been marked as a duplicate of this bug. ***

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.