Closed Bug 234018 Opened 21 years ago Closed 21 years ago

Firefox fonts are not clear

Categories

(Firefox :: General, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: sagaralists, Assigned: bugzilla)

Details

Attachments

(3 files)

User-Agent: Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040207 Firefox/0.8 First, I'm so sorry for the example given, but it demonstrate well what I'm trying to say. If you use Linux/KDE Konqueror 3.2.0, font display even for very small fonts are also very clear. In fact, Firebird 0.7 font clarity is much better than Firefox. Reproducible: Always Steps to Reproduce: 1. 2. 3. Expected Results: May be can learn from Konqueror 3.2.0 (http://konqueror.kde.org) how to display fonts very clear.
are you using the GTK2+XFT build or the basic build? the basic build has normal linux fonts, which aren't so special....
I used firefox-0.8-i686-linux-gtk2+xft.tar.gz. My system configuration is 3.0GHz Intel Pentium 4, 512MB RAM, Linux kernel 2.6.0, XFree86 4.3.1, KDE 3.2, QT 3.2.3, Graphic card is Nvidia GeFORCE FX 5200 with 128MB on-board RAM, graphic driver is nvidia (NVIDIA-Linux-x86-1.0-5336-pkg1.run) and the display is Sharp LCD monitor with 1024x768 resolution with 24-bit color. I have both gtk+-2.2.4 and gtk-1.2 installed.
Attached file HTML example
With font-family set to helvetica in the example, there is no antialiasing. With it set to arial, there is.
(In reply to comment #3) > With font-family set to helvetica in the example, there is no antialiasing. > With it set to arial, there is. Here are the details. I'm using the basic build, but with libgdkxft and manually turned on use of freetype in unix.js by copying from Mozilla's prefs.js. Note antialiasing helvetica works fine in Mozilla 1.0. System is debian woody with libfreetype6 2.0.9-1, xlibs 4.1.0-16woody1, libgtk 1.2.10-11, libgdkxft 1.5-4, Here's what I copied from Mozilla's prefs.js to firefox's unix.js: // TrueType pref("font.FreeType2.enable", true); pref("font.freetype2.shared-library", "libfreetype.so.6"); // if libfreetype was built without hinting compiled in // it is best to leave hinting off pref("font.FreeType2.autohinted", false); pref("font.FreeType2.unhinted", false); // below a certian pixel size anti-aliased fonts produce poor results pref("font.antialias.min", 10); pref("font.embedded_bitmaps.max", 1000000); pref("font.scale.tt_bitmap.dark_text.min", 64); pref("font.scale.tt_bitmap.dark_text.gain", "0.8"); // TrueType font dirs pref("font.directory.truetype.1", "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"); pref("font.directory.truetype.2", "/usr/share/fonts/truetype"); pref("font.directory.truetype.3", "/usr/share/fonts/truetype/openoffice"); pref("font.FreeType2.printing", true); // below a certian pixel size anti-aliased bitmat scaled fonts // produce poor results pref("font.scale.aa_bitmap.enable", true); pref("font.scale.aa_bitmap.always", false); pref("font.scale.aa_bitmap.min", 6); pref("font.scale.aa_bitmap.undersize", 80); pref("font.scale.aa_bitmap.oversize", 120); pref("font.scale.aa_bitmap.dark_text.min", 64); pref("font.scale.aa_bitmap.dark_text.gain", "0.5"); pref("font.scale.aa_bitmap.light_text.min", 64); pref("font.scale.aa_bitmap.light_text.gain", "1.3"); pref("font.scale.bitmap.min", 12); pref("font.scale.bitmap.undersize", 80); pref("font.scale.bitmap.oversize", 120);
I use the following rule to selectively disable AA for small fonts in my fontconfig configuration: <match target="font"> <test qual="any" name="slant" compare="not_eq"> <const>italic</const> </test> <test qual="any" name="slant" compare="not_eq"> <const>oblique</const> </test> <test qual="any" name="weight" compare="not_eq"> <const>bold</const> </test> <test qual="any" name="size" compare="less_eq"> <const>14</const> </test> <edit name="antialias" mode="assign"> <bool>false</bool> </edit> </match> Matching font sizes does not work in Firefox 0.9, but works fine in all other versions and classic Mozilla. If I remove the <match .. size> rule it works okay, e.g. disables AA for all fonts except bold and italic. I'm using Debian/Sid (libxft2 version 2.1.2-6) and official XFT2 0.9 build from mozilla.org
I can also confirm erratic font rendering for Firefox on Linux. Any occurance of a "size" or "pixelsize" match rule in ~/.fonts.conf makes Firefox render fonts strangely. I also use those rules to disable anti-aliasing for small sizes, but those small sizes are rendered ugly, as if it's using a bad font hinter. I will attach a "good" and a "bad" shot of the main menu entries, you can zoom in and compare. Both menus/dialogues/form controls and webpage text is affected. Anti-aliased fonts are OK, whenever AA is applied. At first I thought it had to do only with builds past the release of 0.8, but guess what: I've played around with my ~/.phoenix around yesterday and I've managed to permanently reproduce the bug in it as well. All my preferences, bookmarks, extensions and so on are still there, just that the bad font rendering is now here to stay. :( Unfortunately, I don't have a backup of the "magical" ~/.phoenix that produced the proper rendering. My two cents say that it's Firefox doing something strange, since no other GTK2 or QT application is affected, and the above seems to hint that it's possible to obtain proper rendering by somehow changing something in the preferences. Anyway, I've tried the following variations without any improvement: * Changing the GTK2 theme * Various 2.4 and 2.6 kernels * Various NVidia drivers * Various fontconfig versions (1.x, 2.x, up to 2.2.94 aka 2.3 pre release) * Various xft versions (1.2, 2.1.2, 2.1.5) Someone with a clue, please tell me if there are more relevant tests I can do. For now I will try various Firefox binary builds in a virgin setup to see if I can get back proper rendering. I guess another step would be trying to build Firefox myself, but even if it works it would only solve the problem for me.
Correction: I can now verify that this issue is indeed present only on Firefox 0.9. I was previously fooled by my too-long preferences rescan value in fonts.conf into thinking it also affected 0.8. So let's resume: Firefox 0.8 as well as all the GTK2 and QT applications react correctly to match rules that deactivate AA for small fonts based on size or pixelsize fontconfig rules. Firefox 0.9 renders them badly hinted. HOT TIP: I think it forces the autohinter to be ON, which on my setup, for non-AA fonts, looks bad. Another hint: the problem first appeared for me while trying out nightly builds released after 0.8-stable. At the time I thought they were, well, nightlies, so that it was a passing problem. Only to find the issue still standing in 0.9. So at fault is definitely something that was changed during the transition to 0.9.
Flags: blocking1.0?
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040727 Firefox/0.9.1+ I guess this WORKSFORME, kinda. The only problem I have had regarding fonts is for some websites, the fonts are a little too small. Otherwise, no problems. My fonts setting: Proportional: Serif | Size: 14 Serif: Bitstream Vera Serif Sans-serif: Bitstream Vera Sans Monospace: Bitstream Vera Sans Mono | Size: 12
It now works OK for me too. I did a major cleanup, reinstalled my font directories by hand from scratch and now everything renders fine. Seems it was setup related and not Firefox's fault after all. My bad.
This issue was resolved by installing XFree86 4.4.0 without any modification to firefox configuration. I conclude it was something to do with the underling windowing system. Thanks for all who contribute comments on this.
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Flags: blocking-aviary1.0?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: