Bug 1303460 - firefox-44.0-3.fc23.x86_64 doesn't respect local fontconfig font family alias customization
firefox-44.0-3.fc23.x86_64 doesn't respect local fontconfig font family alias...
Status: CLOSED EOL
Product: Fedora
Classification: Fedora
Component: firefox (Show other bugs)
24
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Martin Stransky
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-01-31 17:30 EST by Fabrice Bellet
Modified: 2017-08-08 08:43 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-08-08 08:43:41 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Fabrice Bellet 2016-01-31 17:30:00 EST
Since firefox-44.0, firefox doesn't respect the font family aliases defined locally in ~/.config/fontconfig/fonts.conf:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">

<fontconfig>
  <match target="font">
    <edit mode="assign" name="hintstyle">
      <const>hintslight</const>
    </edit>
  </match>
  <alias>
    <family>sans-serif</family>
    <prefer>
      <family>DejaVu Sans Condensed</family>
    </prefer>
  </alias>
  <alias>
    <family>serif</family>
    <prefer>
      <family>DejaVu Serif Condensed</family>
    </prefer>
  </alias>
  <alias>
    <family>monospace</family>
    <prefer>
      <family>DejaVu Sans Mono</family>
    </prefer>
  </alias>
[...]
</fontconfig>
Comment 1 Fabrice Bellet 2016-01-31 17:52:09 EST
I can revert to the previous behaviour by setting gfx.font_rendering.fontconfig.fontlist.enabled to false
Comment 2 Artem Hluvchynskyi 2016-02-02 08:56:20 EST
Just updated to firefox-44.0-3 and font matching went haywire even though I only have systemwide font aliases (/etc/fonts/*). I'm not even sure where does it take the rules from as it started matching sans-serif to Comfortaa and ignored Arial (which is installed).

Making the same config change as Fabrice did, brought everything back to normal.
Comment 3 Artem Hluvchynskyi 2016-02-02 09:46:43 EST
Right, in my case it seems this font-family rule:
"Helvetica Neue",Helvetica,Arial,sans-serif
and my font config, ended up matching Helvetica to sans-serif directly and then changes in Firefox's font matching logic matched sans-serif (somewhat randomly) to Comfortaa (which among some other fonts have <prefer> for sans-serif in my case) instead of falling back to Arial. So changes to my font configuration (removing <prefer>s for some fonts) ended up somehow matching to Arial in the end with fontlist enabled.

Still this is quite unexpected as fc-match produces different results for sans-serif:
$ fc-match sans-serif
DejaVuSans.ttf: "DejaVu Sans" "Book"
Comment 4 Elliott Sales de Andrade 2016-02-02 16:01:19 EST
Ah, this must explain why GitHub has started looking terrible. Code blocks use the rule [Consolas, "Liberation Mono", Menlo, Courier, monospace], but somehow Firefox picks NimbusMonL-Regu even though Liberation Mono is installed
Comment 5 Martin Stransky 2016-02-05 07:10:51 EST
Is that a dupe of Bug 1303585 ?
Comment 6 Fabrice Bellet 2016-02-07 14:05:55 EST
(In reply to Martin Stransky from comment #5)
> Is that a dupe of Bug 1303585 ?

Hi,

It looks related yes, even If I cannot reproduce exactly the same behavior than the one reported on this other bug report (FF is not concerned by the fonts defined for gnome with gnome-tweak-tool).

The problem I observe happens when "font.name.sans-serif.x-western" is _NOT_ defined and when font.default.x-western is set to sans-serif. In this case, firefox uses the family alias I defined in my ~/.config/fontconfig/fonts.conf  file for sans-serif.

The difference I observe between FF43 and FF44 is that FF44 no longer seems to accept a family font containing the style part of the font : in the case of the font "DejaVu Sans Condensed", "Condensed" is the style, note the " " in the description of the font:

[bellet@bonobo conf.d]$ fc-match  sans-serif
DejaVuSansCondensed.ttf: "DejaVu Sans" "Condensed"
[bellet@bonobo conf.d]$ fc-match -v sans-serif | head
Pattern has 36 elts (size 48)
	family: "DejaVu Sans"(s) "DejaVu Sans Condensed"(s)
	familylang: "en"(s) "en"(s)
	style: "Condensed"(s) "Book"(s)
	stylelang: "en"(s) "en"(s)
	fullname: "DejaVu Sans Condensed"(s)
	fullnamelang: "en"(s)
	slant: 0(i)(s)
	weight: 80(i)(s)
	width: 87(i)(s)


Firefox renders using "DejaVu Sans" font in this case.

Switching to family "Roboto Condensed" in the local fonts.conf works, because Condensed belongs to the family name of this font.

Alternatively, defining the font with font.name.sans-serif.x-western works as expected with a visible difference between "DejaVu Sans" and "DejaVu Sans Condensed".

HTH,
Comment 7 Martin Stransky 2016-02-29 09:33:00 EST
Firefox 45 should have a fix in fontconfig code - can you please test FF45 Beta? From http://archive.mozilla.org/pub/firefox/candidates/45.0b10-candidates/build1/ for instance. Choose the 64bit or 32bit builds.
Comment 8 Fabrice Bellet 2016-03-02 10:12:25 EST
nope, bug is still there.
Comment 9 Fedora End Of Life 2016-11-24 10:19:22 EST
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '23'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 23 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 10 Fabrice Bellet 2016-11-26 15:14:56 EST
The problem is still there in firefox 50, Fedora 24. Bumping fedora version.
Comment 11 Dawid Zych 2017-01-11 07:34:26 EST
I have similar problem with Firefox 50.1.0 on Fedora 25. Every font that isn't installed on my computer is substituted for default serif font, even if that particular font has different family aliased in /etc/fonts/conf.d/45-latin.conf.
For example Verdana is defined as sans-serif but Firefox substitutes it for "DejaVu Serif".

$ fc-match Verdana
DejaVuSans.ttf "DejaVu Sans" "Book"
Comment 12 Fedora End Of Life 2017-07-25 15:52:36 EDT
This message is a reminder that Fedora 24 is nearing its end of life.
Approximately 2 (two) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 24. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '24'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 24 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
Comment 13 Fedora End Of Life 2017-08-08 08:43:41 EDT
Fedora 24 changed to end-of-life (EOL) status on 2017-08-08. Fedora 24 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Note You need to log in before you can comment on or make changes to this bug.