You are not logged in.

#1 2011-12-22 10:21:49

Leviathan1
Member
Registered: 2010-11-24
Posts: 19

Firefox 9.0: Font matching is broken

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.

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 should look like (Firefox 8 or Epiphany):
epiphany.png

This is what I get on Firefox 9.0:
firefox9.png
This is not Dejavu Sans!!!

Obvious bug in Firefox ?

Offline

#2 2011-12-22 10:55:42

lolilolicon
Member
Registered: 2009-03-05
Posts: 1,722

Re: Firefox 9.0: Font matching is broken

I can confirm this behavior in Firefox 9.0.
On the other hand, if I specify the rule as the following, it works as expected:

  <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>

This silver ladybug at line 28...

Offline

#3 2011-12-22 11:11:38

Leviathan1
Member
Registered: 2010-11-24
Posts: 19

Re: Firefox 9.0: Font matching is broken

I have filed the following bugzilla report:
https://bugzilla.mozilla.org/show_bug.cgi?id=712900

Offline

#4 2011-12-22 11:16:57

lolilolicon
Member
Registered: 2009-03-05
Posts: 1,722

Re: Firefox 9.0: Font matching is broken

Leviathan1 wrote:

I have filed the following bugzilla report:
https://bugzilla.mozilla.org/show_bug.cgi?id=712900

But you seem to be giving the wrong version there:

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0.1) Gecko/20100101 Firefox/8.0.1


This silver ladybug at line 28...

Offline

#5 2011-12-22 11:19:30

Leviathan1
Member
Registered: 2010-11-24
Posts: 19

Re: Firefox 9.0: Font matching is broken

lolilolicon wrote:

I can confirm this behavior in Firefox 9.0.
On the other hand, if I specify the rule as the following, it works as expected:

  <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>

Yes, this workaround seems to fix it. Thanks!

Offline

#6 2011-12-22 11:19:40

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: Firefox 9.0: Font matching is broken

I haven't checked, but maybe you need to specify the binding, e.g.:

<edit name="family" mode="assign" binding="strong">

Offline

#7 2011-12-22 11:23:47

Leviathan1
Member
Registered: 2010-11-24
Posts: 19

Re: Firefox 9.0: Font matching is broken

lolilolicon wrote:
Leviathan1 wrote:

I have filed the following bugzilla report:
https://bugzilla.mozilla.org/show_bug.cgi?id=712900

But you seem to be giving the wrong version there:

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0.1) Gecko/20100101 Firefox/8.0.1

I entered the report on Firefox 8, and the user agent string was added automatically.

Offline

#8 2011-12-22 12:38:23

lolilolicon
Member
Registered: 2009-03-05
Posts: 1,722

Re: Firefox 9.0: Font matching is broken

brebs wrote:

I haven't checked, but maybe you need to specify the binding, e.g.:

<edit name="family" mode="assign" binding="strong">

Yes, this works for me.
The question is, though, why 8.0.1 worked without binding...

Last edited by lolilolicon (2011-12-22 12:38:43)


This silver ladybug at line 28...

Offline

#9 2011-12-29 18:18:02

uberbrodt
Member
Registered: 2011-12-29
Posts: 2

Re: Firefox 9.0: Font matching is broken

Following the discussion in the Mozilla bug report, it looks like FF changed how it interprets the binding argument in fontconfig.  It's not clear to me, not knowing too much about font config, what is to be done about it.  Mozilla seems to think the issue is resolved; are there maybe some settings that we can incorporate into the ArchLinux packages so that we don't all have to do fixes in local.conf?

Also I followed the suggestion in the bugreport to do binding="same" but that had no effect; only binding="strong" seems to resolve the issue for me.

Offline

Board footer

Powered by FluxBB