You are not logged in.

#1 2008-11-23 15:06:42

Shapeshifter
Member
Registered: 2008-03-11
Posts: 231

[solved] Problem with font rendering/smoothing/hinting in Firefox

I just left Opera for Firefox until they fix their pluginwrapper and I notice that the font rendering in Firefox is miserable. See this screenshot that compares Firefox (top), Arora (left) and Opera (right). It's very obvious how Firefox has difficulties rendering the title above that Picture. The "D" character is too big and the whole thing looks weird, while Arora and Opera both look fine.

teWQz

Here's another example of some text. In Firefox, everything is very sharp (some people like it, I don't), while Arora und Opera look much smoother

teWQ0

Now I already tried the following stuff:

1. ) installing cairo-lcd, libxft-lcd and fontconfig-lcd from AUR instead of their non-lcd brothers. That basically enabled subpixel hinting and made fonts slightly washed out and purple-blurry. Not what I need/want. And it didn't solve the problem with the misshaped "D" and bulky fonts in Firefox

2. ) Adding the following to ~/.gtkrc-2.0:

gtk-xft-antialias = 1 
gtk-xft-hinting = 1
gtk-xft-hintstyle = hintnone
gtk-xft-rgba = vrgb

I also tried other options like hintfull and the like but it doesn't seem to do anything, even after restarting X.

3. ) Doing stuff in ~/.fonts.conf. Atm it's like this, but changing stuff doesn't do anything...

<?xml version="1.0"?><!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
 <match target="font" >
  <edit mode="assign" name="rgba" >
   <const>none</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>hintmedium</const>
  </edit>
 </match>
 <match target="font" >
  <edit mode="assign" name="antialias" >
   <bool>true</bool>
  </edit>
 </match>
</fontconfig>

4. ) Tried to add some stuff in Firefox like:
browser.display.auto_quality_min_font_size = 0
gfx.use_text_smoothing_setting = true
But that doesn't help either.


I tried everything! And these fonts look like crap while in other browsers they are perfectly fine... Now does anyone have any other suggestions on how to fix these damn fonts in Firefox? I wont install stuff like gnome-appearance-properties btw just to make this work. There must be a reasonable solution. I don't have gnome installed and I'm using Compiz-Fusion on plain X without a DE.

Any ideas? Please, this is drving me nuts!

Last edited by Shapeshifter (2008-11-24 09:39:00)

Offline

#2 2008-11-23 15:45:28

Procyon
Member
Registered: 2008-05-07
Posts: 1,819

Re: [solved] Problem with font rendering/smoothing/hinting in Firefox

Does it help if you force a font, like Verdana, (untick the box that allows sites to use their own font in advanced fonts), and a minimum size?

Offline

#3 2008-11-23 16:06:41

Shapeshifter
Member
Registered: 2008-03-11
Posts: 231

Re: [solved] Problem with font rendering/smoothing/hinting in Firefox

No that doesn't solve the problem. Now all the text is in the same font, but it still looks weird

Last edited by Shapeshifter (2008-11-23 16:07:11)

Offline

#4 2008-11-23 20:11:30

dunc
Member
From: Glasgow, UK
Registered: 2007-06-18
Posts: 559

Re: [solved] Problem with font rendering/smoothing/hinting in Firefox

The Gecko engine's font rendering isn't great, but it should be better than that. Are you sure the package you installed isn't using a static Cairo? Because that might do it, although in my experience it tends to look even worse.


0 Ok, 0:1

Offline

#5 2008-11-23 20:38:39

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: [solved] Problem with font rendering/smoothing/hinting in Firefox

this produces the best result on my wm-only setup:

.fonts.conf

<fontconfig>
   <match target="font" >
      <edit name="rgba" mode="assign"><const>rgb</const></edit>
      <edit name="hinting" mode="assign"><bool>true</bool></edit>
      <edit name="antialias" mode="assign"><bool>true</bool></edit>
      <edit name="autohint" mode="assign"><bool>false</bool></edit>
      <edit mode="assign" name="hintstyle"><const>hintslight</const></edit>
   </match>     
</fontconfig>

.Xresources

Xft.lcdfilter:  lcddefault
Xft.hintstyle:  hintslight

then run:

xrdb -merge ~/.Xresources

and restart firefox to see it helps. smile


ᶘ ᵒᴥᵒᶅ

Offline

#6 2008-11-23 22:49:57

Shapeshifter
Member
Registered: 2008-03-11
Posts: 231

Re: [solved] Problem with font rendering/smoothing/hinting in Firefox

Hell it worked!! Font rendering is _much_ better now. No more odd shaped characters.

Thanks a lot litemotiv, you saved my day smile

Slight hint of purple around the characters there but I guess that's tuneable...

Last edited by Shapeshifter (2008-11-23 22:50:22)

Offline

#7 2008-11-24 16:45:10

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: [solved] Problem with font rendering/smoothing/hinting in Firefox

Shapeshifter wrote:

Hell it worked!! Font rendering is _much_ better now. No more odd shaped characters.

Thanks a lot litemotiv, you saved my day smile

Slight hint of purple around the characters there but I guess that's tuneable...

that's probably the subpixel rendering (RGBA), it makes small fonts a little bit smoother but can produce slight color fringing as a side effect. you can try any of these modes to see which works best for you:

rgb            rgba           FC_RGBA_RGB
bgr            rgba           FC_RGBA_BGR
vrgb           rgba           FC_RGBA_VRGB
vbgr           rgba           FC_RGBA_VBGR
none           rgba           FC_RGBA_NONE

ᶘ ᵒᴥᵒᶅ

Offline

#8 2014-02-23 00:06:12

chalist
Member
Registered: 2014-02-23
Posts: 6

Re: [solved] Problem with font rendering/smoothing/hinting in Firefox

litemotiv wrote:

this produces the best result on my wm-only setup:

.fonts.conf

<fontconfig>
   <match target="font" >
      <edit name="rgba" mode="assign"><const>rgb</const></edit>
      <edit name="hinting" mode="assign"><bool>true</bool></edit>
      <edit name="antialias" mode="assign"><bool>true</bool></edit>
      <edit name="autohint" mode="assign"><bool>false</bool></edit>
      <edit mode="assign" name="hintstyle"><const>hintslight</const></edit>
   </match>     
</fontconfig>

.Xresources

Xft.lcdfilter:  lcddefault
Xft.hintstyle:  hintslight

then run:

xrdb -merge ~/.Xresources

and restart firefox to see it helps. smile

greate smile
thanks dude big_smile

Offline

#9 2014-02-23 00:35:35

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,193

Re: [solved] Problem with font rendering/smoothing/hinting in Firefox


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

Board footer

Powered by FluxBB