Firefox and font rendering

Hi!

I know there are 1000 other threads about Firefox and the font rendering, but the more i read, the more i get puzzled. I followed this howto openSUSE starter: Step 4. Get yer subpixel hinted fonts: openSUSE 11.4 & 12.1 and the fonts in the system looked great, some webpages as well, but others woud look like ****. So i tried also installing freetype packages from the community-repo, but there was no change. Well, at the moment i have the following user.js file in my firefox profile:

user_pref(“font.FreeType2.enable”, “true”);
user_pref(“font.FreeType2.autohinted”, “true”);
user_pref(“font.FreeType2.printing”, “true”);
user_pref(“font.FreeType2.unhinted”, “false”);

the following packages are installed from the community-repo (Index of /subpixel/openSUSE_12.1/)

fontconfig
fontcofing-feature-subpixel-hinting
freetype2-feature-subpixel-hinting
librfreetype6
libpixman-1-0

Does anyone have an idea?

What about your settings in firefox
SUSE Paste
This is mine

They are the same. The fonts are really beatiful for example: dnevnik.bg and orf.at. But twitter.com and opensuse-community.org are awful.

EDIT: If i force the Dejavu fonts everything would be ok, but some pages would look really broken.

Have you installed the MS truetype fonts by installing the fetchmsttfonts package from the openSUSE-12.1-Oss repo?

I do not need ms fonts, but I tried with them - no change. I do not think the issue is font driven. In my opinion it has something to do with freetype.

But twitter.com and opensuse-community.org are awful.

Not for me
They look perfect

Same for me. twitter.com and opensuse.org both are rendered perfectly.

Same here, fonts on twitter c.s. look fine. Could you test this for a clean new useraccount?

Hello! I tried with new profile, i thought that some addon may interefere with font rendering, but there was no change. Is it actually freetype issue, or firefox issue? Don’t know. Here is what i have:

fontconfig 2.8.0-88.1
fontcofing-feature-subpixel-hinting 2.8.0-88.1
freetype2-feature-subpixel-hinting 2.4.7-666.1
librfreetype6 2.4.7-666.1
libpixman-1-0 0.22.2-666.1

user.js in my profile folder:

user_pref(“font.FreeType2.enable”, “true”);
user_pref(“font.FreeType2.autohinted”, “true”);
user_pref(“font.FreeType2.printing”, “true”);
user_pref(“font.FreeType2.unhinted”, “false”);

.fonts.conf in ~

<?xml version=‘1.0’?>
<!DOCTYPE fontconfig SYSTEM ‘fonts.dtd’>
<fontconfig>
<match target=“font”>
<edit mode=“assign” name=“rgba”>
<const>rgb</const>
</edit>
</match>
<match target=“font”>
<edit mode=“assign” name=“hinting”>
<bool>true</bool>
</edit>
</match>
<match target=“font”>
<edit mode=“assign” name=“hintstyle”>
<const>hintslight</const>
</edit>
</match>
<match target=“font”>
<edit mode=“assign” name=“autohint”>
<bool>true</bool>
</edit>
</match>
<match target=“font”>
<edit mode=“assign” name=“antialias”>
<bool>true</bool>
</edit>
</match>
</fontconfig>

the settings in firefox:

SUSE Paste

SUSE Paste

SUSE Paste

And the results (the screenshots are somewhat nicer than the reality):

SUSE Paste

SUSE Paste

SUSE Paste

SUSE Paste

SUSE Paste

Any ideas?

UPDATE: Obviously is the same issue here:

http://forums.opensuse.org/english/get-technical-help-here/applications/473373-wrong-subpixel-hinting-opensuse-12-1-a.html

On 2012-03-13 12:06, yavorf wrote:
>
> UPDATE: Obviously is the same issue here:
>
> http://tinyurl.com/7ts4f6p

You will have to post photos, so that people see what you see.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

They are here: http://forums.opensuse.org/english/get-technical-help-here/applications/473339-firefox-font-rendering.html#post2447993

Thanks to e1nste1n and this post on a similar issue I managed to find a solution.

Not to repeat my self, the first part of setting the beautiful font rendering is here.

Then comes the file .fonts.conf file in ~/
Should be like that:

<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
 <match target="font">
  <edit mode="assign" name="rgba">
   <const>rgb</const>
  </edit>
 </match>
 <match target="font">
  <edit mode="assign" name="hinting">
   <bool>true</bool>
  </edit>
 </match>
 <match target="font">
  <edit mode="assign" name="hintstyle">
   <const>hintslight</const>
  </edit>
 </match>
 <match target="font">
  <edit mode="assign" name="autohint">
   <bool>true</bool>
  </edit>
 </match>
 <match target="font">
  <edit mode="assign" name="antialias">
   <bool>true</bool>
  </edit>
 </match>
<!-- Here comes the font substitution -->
<match target="pattern" name="family">
  <test name="family" qual="any">
   <string>Helvetica</string>
  </test>
  <edit binding="strong" mode="prepend" name="family">
   <string>Liberation Sans</string>
  </edit>
 </match>
<match target="pattern" name="family">
  <test name="family" qual="any">
   <string>Times</string>
  </test>
  <edit binding="strong" mode="prepend" name="family">
   <string>Liberation Serif</string>
  </edit>
 </match>
<match target="pattern" name="family">
  <test name="family" qual="any">
   <string>Courier</string>
  </test>
  <edit binding="strong" mode="prepend" name="family">
   <string>Liberation Mono</string>
  </edit>
 </match>
<match target="pattern" name="family">
  <test name="family" qual="any">
   <string>Verdana</string>
  </test>
  <edit binding="strong" mode="prepend" name="family">
   <string>DejaVu Sans</string>
  </edit>
 </match>
<match target="pattern" name="family">
  <test name="family" qual="any">
   <string>Georgia</string>
  </test>
  <edit binding="strong" mode="prepend" name="family">
   <string>DejaVu Serif</string>
  </edit>
 </match>
</fontconfig>

After that all the canges can be tested on this site Font Tester - CSS Font Comparison Tool

That’s all, thank you!

EDIT: I’m marking the thread as solved.

EDIT: I don’t know how.

Thanks for the ~/.fonts.conf. This is the best my fonts have looked on openSUSE.