Closed Bug 712900 Opened 9 years ago Closed 9 years ago

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


(Core :: Graphics, defect)

9 Branch
Not set





(Reporter: rdover, Unassigned)



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" >
    <edit name="family" mode="assign">
        <string>DejaVu Sans</string>

[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 … ont-family  with the following snippit I get:

<style type="text/css">

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


This is wat it looks like on Firefox 9.0:

This is not DejaVu Sans!

Expected results:

This is wat it should look like (Firefox 8 or Epiphany):
Severity: normal → major
Changing the font assignment as follows seem to work as a workaround:

  <match target="pattern" name="family" >
    <test name="family" qual="any" >
    <edit name="family" mode="prepend" binding="strong">
      <string>DejaVu Sans</string>
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
Closed: 9 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.