Closed Bug 217546 Opened 21 years ago Closed 21 years ago

Failure to display font character when page uses style sheet

Categories

(Core Graveyard :: GFX: Gtk, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: paul, Unassigned)

References

()

Details

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5b) Gecko/20030827

The page at http://lessig.org/blog/ uses a css style sheet
(http://lessig.org/lessig.css).

Mozilla 1.4 shows all characters correctly from the Verdana font specified by
the style sheet but 1.5b fails to show the apostrophes ('s). It displays a box
as if the character was missing from the font. If I set the Verdana font as the
default font for Mozilla and view some other page, 1.5b renders it correctly.

I notice that the sizes specified by the style sheet are different to the sizes
normally displayed by Mozilla/X, perhaps this is the cause of the problem? I was
using XFree86 4.3.0. 

Reproducible: Always

Steps to Reproduce:
1. Install MS truetype fonts if necessary
2. Browse given URL with 1.5b
3. Use ctrl++/ctrl+- to vary font sizes
4. Use Edit/prefs/appearance/fonts to set default proportional font to Verdana
5. Browse eg Help/Release Notes and repeat step 3.

Actual Results:  
In Step 3. page displayed incorrectly with missing apostrophe
In Step 5. page displayed correctly

Expected Results:  
Doh!

Although I specifically refer to the Verdana font I would expect the bug to show
up with other fonts and other web pages/style sheets. I also encountered this
bug using various nightly builds since 1.4 was released.
Just tried the 1.5 release and the bug is still there.
Just tried the nightly build (10 mins ago) - bug still there.
Finally found out how to fix this problem. Every build I've downloaded has had
FreeType2 disabled even though it would still display tt fonts (with the above
errors). Though I tried enabling it in about:config, this is not enough; The
paths to the ttf font directories must be specified explicitly in the file
user.js in ~/.mozilla/default/yrsm1s9v.slt/ or whatever the profile directory
happens to be:

user_pref("font.directory.truetype.1","/usr/share/fonts/ttf/ttf-bitstream-vera");
user_pref("font.directory.truetype.2","/usr/share/fonts/ttf/truetype");
user_pref("font.FreeType2.enable",true);
user_pref("font.FreeType2.unhinted", false);

It would be nice if this sort of thing was available in the preferences
dialogue. Anyway, I'm marking this as resolved/invalid since it was never really
a bug proper.
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → INVALID
Component: Layout: Fonts and Text → GFX: Gtk
Mozilla has two ways of interacting with freetype:
 * directly (--enable-freetype2)
 * via fontconfig and Xft (--enable-xft)

The latter is greatly preferred and the former will hopefully go away once
printing doesn't depend on it.  The latter has the huge advantage that it picks
up existing system configuration rather than requiring the user to configure the
location of fonts explicitly.
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.