Open Bug 542111 Opened 14 years ago Updated 1 year ago

Create an observer for gfx.use_text_smoothing_setting in gfxPlatformMac.cpp


(Core :: Graphics, defect)





(Reporter: Tobias1974, Unassigned)


User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; de; rv: Gecko/20091221 Firefox/3.5.7
Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; de; rv: Gecko/20091221 Firefox/3.5.7

In Firefox 3.5 you can switch off the text smoothing (Cleartype in Firefox). In the configuration file (about:config) you can change it in the category "leave gfx.use_text_smoothing_setting" the text smoothing. In 3.6 the old settings are not transferred. And while the entry is allready to find in the configuration file, you can not change the text smoothing. I want to turn off the "smooth text" in the browser. Is there a solution for this problem? I work with Firefox under OSx. How or whether it works on Windows, I have not tried this yet.

Reproducible: Always

Steps to Reproduce:
It didnt work everey time
Actual Results:  

Expected Results:  
Switching off the text smoothing in Firefox 3.6
Alias: Tobi74
Please go to and they can help you with your settings.
Alias: Tobi74
Closed: 14 years ago
Resolution: --- → INVALID
Version: unspecified → 3.6 Branch
Thank you for the fast comment. But it is not a problem of switching the settings the right way as it seems. It didnt work. I have tried it on different Macs. Other OSx-Users report it too.
We have found the responsible one: Ad Block plus!  We discussed ut in the german Firefox-Forum.

And here at Bugzilla@Mozdev – Bug 22313
Let's reopen this. I checked and this is being caused by this line in the Adblock Plus XPCOM component:

> var styleService = Cc[";1"].getService(Ci.nsIStyleSheetService);

Apparently this changes the initialization sequence enough that gfx.use_text_smoothing_setting preference is no longer considered. I'll change Adblock Plus to do lazy initialization of course but this should still be more robust IMO.
Component: General → Style System (CSS)
Product: Firefox → Core
QA Contact: general → style-system
Resolution: INVALID → ---
Version: 3.6 Branch → Trunk
Confirming and changing summary to reflect the actual problem. I reproduced this in a Minefield build (20100119) so this affects trunk as well.
Ever confirmed: true
Summary: Firefox 3.6 - turn off text smoothing (OSx) → Instantiating nsIStyleSheetService too early causes gfx.use_text_smoothing_setting preference to be ignored
Blocks: abp
The latest build (28-Jan-2010 02:20  289762) works!
Textsmoothing can be switched off. Thank you!!
Perhaps this somehow causes the gfxPlatformMac constructor to be called from inside pref service initialization, such that its call to GetService the pref service fails?

Is that line in AdBlock plus being called from something that is in turn called from initializing the pref service?

If so, a stack showing how would probably lead to the problem.
This line is executed when the XPCOM component loads. Given that it is registered in the app-startup category, that's probably when it is loaded. In other words - yes, it is getting the stylesheet service before "profile-after-change" event, preferences should be unavailable at that point.
Ah, if it's before we have a profile (a simpler explanation), then this is just the fact that the code that reads the pref doesn't have a pref observer to observe changes.
Component: Style System (CSS) → Graphics
QA Contact: style-system → thebes
David, what are you suggesting for the solution?  

Right now the code is doing the pref read at platform initialization, seems like we should just make this a lazy read set up the first time the value is needed and the pref service is available.  I'm guessing that's what is desired here, I don't think there must to be done when the pref service is unavailable.
Assignee: nobody → jdaggett
No longer blocks: abp
This could possibly be a mentored bug, but I unfortunately don't have the time to write it up right now :(
Summary: Instantiating nsIStyleSheetService too early causes gfx.use_text_smoothing_setting preference to be ignored → Create an observer for gfx.use_text_smoothing_setting in gfxPlatformMac.cpp
Assignee: jd.bugzilla → nobody
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.