All users were logged out of Bugzilla on October 13th, 2018

Firefox 9.0: Fontconfig family edits are not effective without explicit binding

RESOLVED INVALID

Status

()

--
minor
RESOLVED INVALID
7 years ago
6 years ago

People

(Reporter: rdover, Unassigned)

Tracking

9 Branch
x86_64
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

7 years ago
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0.1) Gecko/20100101 Firefox/8.0.1
Build ID: 20111122085954

Steps to reproduce:

I have, among other the following font substitution in .fonts.conf:

 <match target="pattern" name="family" >
    <test name="family" qual="any" >
        <string>Verdana</string>
    </test>
    <edit name="family" mode="assign">
        <string>DejaVu Sans</string>
    </edit>
 </match>

[me@mycroft ~]$ fc-match Verdana
DejaVuSans.ttf: "DejaVu Sans" "Book"

I don't have the Microsoft fonts installed, and have similar substitutions for the other common web fonts and on Firefox 8 or on Epiphany this works wonderfully. On Firefox 9, however, some websites look really absolutely horrible.


Actual results:

When I test on http://www.w3schools.com/css/tryit.asp? … ont-family  with the following snippit I get:

<html>
<head>
<style type="text/css">
p.sansserif{font-family:Verdana;}
</style>
</head>

<body>
<h1>CSS font-family</h1>
<p class="sansserif">This is a paragraph, shown in the Verdana or Dejavu Sans font.</p>

</body>
</html>

This is wat it looks like on Firefox 9.0:
http://postimage.org/image/s6p8kp06n/

This is not DejaVu Sans!



Expected results:

This is wat it should look like (Firefox 8 or Epiphany):
http://postimage.org/image/w1smn9jcf/
(Reporter)

Updated

7 years ago
Severity: normal → major
(Reporter)

Comment 1

7 years ago
Changing the font assignment as follows seem to work as a workaround:

  <match target="pattern" name="family" >
    <test name="family" qual="any" >
      <string>Verdana</string>
    </test>
    <edit name="family" mode="prepend" binding="strong">
      <string>DejaVu Sans</string>
    </edit>
  </match>

Updated

7 years ago
Severity: major → minor
The default binding for the edit element is "weak", so you probably want an explicit binding="same".  With that, I expect mode="assign" should work (unless there is another rule taking precedence in system fontconfig files), but "prepend" is more conventional.

The behaviour change is most likely due to bug 678561 being fixed, prior to which most families were incorrectly given weak binding.
Blocks: 678561
Status: UNCONFIRMED → RESOLVED
Last Resolved: 7 years ago
Component: General → Graphics
Product: Firefox → Core
QA Contact: general → thebes
Resolution: --- → INVALID
Summary: Firefox 9.0: Font matching is broken on Linux → Firefox 9.0: Fontconfig family edits are not effective without explicit binding
You need to log in before you can comment on or make changes to this bug.