Bug 114464 - default Serif font is badly readable in Firefox
Summary: default Serif font is badly readable in Firefox
Status: RESOLVED FIXED
Alias: None
Product: SUSE LINUX 10.0
Classification: openSUSE
Component: Firefox (show other bugs)
Version: Beta 3
Hardware: Other All
: P5 - None : Normal
Target Milestone: ---
Assignee: E-mail List
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-31 16:20 UTC by Jiri Dluhos
Modified: 2005-09-02 13:04 UTC (History)
1 user (show)

See Also:
Found By: Other
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
Screenshot of Firefox showing a page using the serif font. (175.98 KB, image/png)
2005-08-31 16:21 UTC, Jiri Dluhos
Details
Results of grepping for fonts used by Firefox in the moment. (1010 bytes, text/x-log)
2005-09-01 08:33 UTC, Jiri Dluhos
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Dluhos 2005-08-31 16:20:48 UTC
The standard Serif font is rendered badly in Firefox, and possibly other
applications. Parts of characters are not visible, characters are placed too
densely. Seems like bad hinter setting, larger sizes look better.

Please see the attached screenshot.
Comment 1 Jiri Dluhos 2005-08-31 16:21:40 UTC
Created attachment 48336 [details]
Screenshot of Firefox showing a page using the serif font.
Comment 2 Wolfgang Rosenauer 2005-08-31 17:49:44 UTC
I'm not sure whom to blame here. Firefox is using XFT (and a little bit of
pangoxft AFAIK). Maybe some font setting is screwed up on your system.
Comment 3 Mike Fabian 2005-08-31 17:57:12 UTC
Can you please check which fonts exactly firefox is using?

Checking should be possible like this:

mfabian@magellan:/tmp/YaST2$ ps aux | grep firefox
mfabian   4404  0.0  0.3   9144  1640 ?        S    17:00   0:00 /bin/sh /usr/bin/firefox
mfabian   4409  0.2 18.1 276156 92124 ?        Sl   17:00   0:27 /opt/MozillaFirefox/lib64/firefox-bin
mfabian  11665  0.0  0.1   5836   828 pts/17   R+   19:55   0:00 grep firefox
mfabian@magellan:/tmp/YaST2$ grep X11/fonts /proc/4409/maps
2aaaaaae5000-2aaaaab08000 r--p 00000000 03:01 479068                     /usr/X11R6/lib/X11/fonts/truetype/verdana.ttf
2aaab482c000-2aaab484f000 r--p 00000000 03:01 479068                     /usr/X11R6/lib/X11/fonts/truetype/verdana.ttf
2aaab48a6000-2aaab48d9000 r--p 00000000 03:01 479107                     /usr/X11R6/lib/X11/fonts/truetype/ariali.ttf
2aaab4a00000-2aaab4e5a000 r--p 00000000 03:01 471851                     /usr/X11R6/lib/X11/fonts/truetype/hgjgbbmp.ttc
2aaab4fe0000-2aaab543a000 r--p 00000000 03:01 471851                     /usr/X11R6/lib/X11/fonts/truetype/hgjgbbmp.ttc
2aaab5cc6000-2aaab5d0c000 r--p 00000000 03:01 479105                     /usr/X11R6/lib/X11/fonts/truetype/arialbd.ttf
2aaab5e35000-2aaab5e79000 r--p 00000000 03:01 472604                     /usr/X11R6/lib/X11/fonts/truetype/arial.ttf
2aaab5ef1000-2aaab5f13000 r--p 00000000 03:01 479124                     /usr/X11R6/lib/X11/fonts/truetype/verdanab.ttf
mfabian@magellan:/tmp/YaST2$

I.e. grep in /proc/<process-id-of-firefox-bin>/maps for the fonts.
Comment 4 Jiri Dluhos 2005-09-01 08:33:10 UTC
Created attachment 48421 [details]
Results of grepping for fonts used by Firefox in the moment.
Comment 5 Jiri Dluhos 2005-09-01 08:35:08 UTC
Please see the log. Unfortunately I don't know which fonts they are, just the
file names. Hopefully it helps.
Comment 6 Mike Fabian 2005-09-01 10:15:09 UTC
thowr___.ttf   Thorndale AMT:style=Regular 
albw.ttf       Albany AMT:style=Regular
albwb.ttf      Albany AMT:style=Bold 
albwi.ttf      Albany AMT:style=Italic
cumbwr__.ttf   Cumberland AMT:style=Regular
thowb___.ttf   Thorndale AMT:style=Bold

These are all from the agfa-fonts package and they are used as the default
fonts in almost all applications.
Comment 7 Mike Fabian 2005-09-01 10:36:32 UTC
Then the serif font you are seeing must be "Thorndale AMT".

Comment 8 Jiri Dluhos 2005-09-01 10:59:41 UTC
Yes, it is Thorndale. I have tried it in Konqueror and Kate, the font looks
equally ugly in both. :-(

It seems that the font renderer has problems with this particular font in small
sizes.
Comment 9 Mike Fabian 2005-09-01 11:07:29 UTC
Wolfgang, this is not related to the rendering of this font, but I always wondered why the default font for "Proportional" in Firefox and Mozilla is "Serif" and not "Sans Serif". In small sizes, "Sans Serif" is usually better readable. I always change this setting myself in Mozilla/Firefox.
Comment 10 Mike Fabian 2005-09-01 11:07:51 UTC
Wolfgang, this is not related to the rendering of this font, but I
always wondered why the default font for "Proportional" in Firefox and
Mozilla is "Serif" and not "Sans Serif". In small sizes, "Sans Serif"
is usually better readable. I always change this setting myself in
Mozilla/Firefox.

Comment 11 Mike Fabian 2005-09-01 11:09:18 UTC
KDE defaults to "Sans Serif for most stuff. Mozilla/Firefox are the
only programs I currently know which default to "Serif" as the
standard font.

Comment 12 Wolfgang Rosenauer 2005-09-01 11:21:47 UTC
changed default for Firefox to sans-serif. (not for mozilla yet)
Comment 13 Mike Fabian 2005-09-01 12:29:09 UTC
Thank you!
Comment 14 Mike Fabian 2005-09-01 13:15:46 UTC
Some more comments to help Jiri to setup the fonts better for his taste:

Serif fonts usually render not well at small sizes.  That's the reason
why sans-serif fonts are usually the default on computer screens.
Serif fonts need high resolutions to render nicely, higher resolutions
than todays computer monitors can usually offer.

"Thorndale AMT" is not an especially bad font, to the contrary it is
quite good, better than most serif fonts. If you compare with
Microsoft's "Times New Roman" (you can get it from webfonts.rpm SuSE
internally or with the fetchmsttfonts script offered via YOU) you will
see that there is almost no difference. "Thorndale AMT" is an almost
identical clone of "Times New Roman". These fonts are about as good as
a serif font can get.

If that is still not good enough you can try the following tweaks.

1) Try different values of "hintstyle":
=======================================

In the KDE control center

   look & feel -> Fonts -> anti-aliasing -> setup

you can choose between 4 different hint styles:

   hintnone
   hintslight
   hintmedium
   hintfull

The default is "hintfull". With hintfull, the characters get blacker
because the stems are moved somewhat to align with the pixel grid,
the disadvantage is that the characters are deformed somewhat, the distances
between characters may vary, even the distances between the legs of 'm'
may vary, circles like in 'o' may not be completely round ...
But you get less gray and most people seem to feel that this is sharper
and better readable.

With "hintnone", the characters are neither moved nor distorted but
therfore you get a lot more gray. Many people feel that this looks
much better when they first try it because of the lack of distortion
many people also say that the eyes get tired when reading longer texts
with that much gray.

"hintslight" and "hintmedium" are in-between. Both values are the same.

Instead of setting this in KDE, you can also type this manually
into your ~/.fonts.conf file (that's where the KDE control centre saves
this setting). For example:

        <match target="font">
                <edit name="antialias">
                        <bool>true</bool>
                </edit>
                <edit name="autohint">
                        <bool>true</bool>
                </edit>
                <edit name="hintstyle">
                        <bool>hintnone</bool>
                </edit>
        </match>

(The ~/fonts.conf file also needs a <fontconfig> tag at the beginning
and a </fontconfig> tag at the end).

2) Use the byte code interpreter and *no* anti-aliasing at small sizes:
=======================================================================

(By the way, this is the default on Microsoft windows XP).

This setting makes sense only for a small list of fonts which have
good byte code. The only fonts I know where this makes sense are the
agfa-fonts ("Thorndale AMT" is one of them) and the Microsoft
webfonts. To use the byte code interpreter and *no* anti-aliasing for
a certain list of fonts you can copy the following rule from
/etc/fonts/suse-pre-user.conf to your ~/.fonts.conf and replace the
pixel limit '0' by something non-zero.  The default on Windows XP is
'18':


        <!--
            The following rule sets up black and white rendering with
            the byte code interpreter for a small list of fonts which
            are known to have good byte code and give bitmap quality
            results at small sizes.
            The pixelsize limit is set to '0' though, which effectively
            disables this rule by default because most users don't like
            that bitmap look and feel.
            If you like a bitmap look and feel of your desktop,
            copy this rule into your ~/.fonts.conf file and replace the '0'
            with non-zero pixelsize limit. Using '18' as the pixelsize
            limit is a good choice if you have the fonts in this list installed
            and like a bitmap look and feel. 
        -->
        <match target="font">
                <test name="family">
                        <string>Andale Mono</string>
                        <string>Arial</string>
                        <string>Comic Sans MS</string>
                        <string>Georgia</string>
                        <string>Impact</string>
                        <string>Trebuchet MS</string>
                        <string>Verdana</string>
                        <string>Courier New</string>
                        <string>Times New Roman</string>
                        <string>Tahoma</string>
                        <string>Webdings</string>
                        <string>Albany AMT</string>
                        <string>Thorndale AMT</string>
                        <string>Cumberland AMT</string>
                </test>
		<test name="pixelsize" compare="less_eq">
				<double>18</double>        <!-- use a non-zero pixel size to enable this rule -->
		</test>
                <edit name="autohint">
                        <bool>false</bool>
                </edit>
                <edit name="antialias">
                        <bool>false</bool>
                </edit>
        </match>


This will give a very clear and readable rendering, it looks as if
high quality bitmap fonts are used.


This method does produce very bad results for most free fonts. They
don't have good byte code and render very badly without anti-aliasing
at small sizes.

But the agfa-fonts are installed by default and are the default fonts
almost everywhere, you will see almost no antialiasing anymore.  Even
more if you install the Microsoft webfonts as well.

Although this gives a very clear, sharp, readable rendering, people
don't agree whether this is beautiful or not. When I made this the
default on beta1, I got many complaints, therefore I disabled it again
by reducing the activation limit to '0' in
/etc/fonts/suse-pre-user.conf.

You can try if you like that.

If I can make it in time for the release, I will introduce a new
variable in /etc/sysconfig/fonts-config and if that variable is set
this rendering style will be activated.

Comment 15 Jiri Dluhos 2005-09-01 13:29:06 UTC
Thank you very much for an excellent explanation. Maybe we could make it a HOWTO
document?

I know font settings are always a matter of taste and need some tweaking (even
on Windows ;-), I was just curious why some pages look so strangely in Firefox.
With Serif font, they work perfectly well.
Comment 16 Florent CHANTRET 2005-09-02 13:04:00 UTC
Take a look there :
http://www.opensuse.org/index.php/Optimal_Use_of_MS_TrueType_Core_Fonts_on_SuSE

I'm writing a WIKI topic about MS TrueType Core Fonts rendering if you like this
kind of rendering.

As discussed with Mike Fabian, perhaps I will suggest a bug against SuSE main
documentation as it is really important to be happy with its fonts.