Closed Bug 1824898 Opened 2 years ago Closed 2 years ago

System-wide setting of browser.display.use_document_fonts does not work

Categories

(Core :: Layout: Text and Fonts, defect)

Firefox 111
defect

Tracking

()

RESOLVED INVALID

People

(Reporter: vseleznv, Unassigned)

References

Details

Steps to reproduce:

Hi!

System-wide settings are present (some calls it "organization configuration"), and it set browser.display.use_document_fonts to 0 (in my case, it's a (GNU/)?Linux machine with a js-file in /etc/firefox/prefs/ directory).

Actual results:

Every new instance of Firefox sets browser.display.use_document_fonts to 1 as a default value anyway.

Interesting that other about:config options set via that config are set correctly.

Expected results:

browser.display.use_document_fonts is set to 0 as a default value.

The Bugbug bot thinks this bug should belong to the 'Core::JavaScript Engine' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → JavaScript Engine
Product: Firefox → Core
Component: JavaScript Engine → Settings UI
Product: Core → Firefox
Component: Settings UI → Layout: Text and Fonts
Product: Firefox → Core

(In reply to Vladimir D. Seleznev from comment #0)

System-wide settings are present (some calls it "organization configuration"), and it set browser.display.use_document_fonts to 0 (in my case, it's a (GNU/)?Linux machine with a js-file in /etc/firefox/prefs/ directory).

Side note, it appears this has been a FlatPak/Snap-specific feature which official Firefox release builds don't support -- though Bug 1170092 migrated it to official builds quite recently (in Firefox 112, currently Beta).

In trying that feature out to test this bug, I initially misunderstood where to create the prefs file, and I stumbled on a startup crash in the feature, which I've now filed as bug 1826234.

Depends on: 1170092

Anyway; after I figured out how to use the feature, I'm unable to reproduce this bug -- I'm seeing EXPECTED RESULTS here.

I have one theory about what might've gone wrong, though -- maybe you used quotes when you shouldn't have? For correct results, I think the line in your JS file should look like this:

pref('browser.display.use_document_fonts', 0);

Note the raw literal 0, with no quotes around it, since this about:config pref is an integer.

If you instead specify '0' or "0", then I think the line probably gets rejected by the preferences engine (similar to how it's rejected if you try to manually adjust the value of this preference in about:config and you type in a value with quotes).

Flags: needinfo?(vseleznv)

(In reply to Daniel Holbert [:dholbert] from comment #3)

Anyway; after I figured out how to use the feature, I'm unable to reproduce this bug -- I'm seeing EXPECTED RESULTS here.

I have one theory about what might've gone wrong, though -- maybe you used quotes when you shouldn't have? For correct results, I think the line in your JS file should look like this:

pref('browser.display.use_document_fonts', 0);

Note the raw literal 0, with no quotes around it, since this about:config pref is an integer.

If you instead specify '0' or "0", then I think the line probably gets rejected by the preferences engine (similar to how it's rejected if you try to manually adjust the value of this preference in about:config and you type in a value with quotes).

No, the configuration is OK. I just discovered that none of these custom settings are applied on Firefox instances I run. Tracing the Firefox threads show that they do not even read /etc/firefox/pref/. Not sure where the bug is.

For now I close the bug, sorry for the noise.

Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Flags: needinfo?(vseleznv)
Resolution: --- → INVALID

(In reply to Vladimir D. Seleznev from comment #4)

I just discovered that none of these custom settings are applied on Firefox instances I run. Tracing the Firefox threads show that they do not even read /etc/firefox/pref/. Not sure where the bug is.

That makes sense -- as I noted in comment 2, until recently, this custom-prefs-in-/etc feature has only existed as a snap/flatpak-specific feature (i.e. for those special versions of Firefox), and it hasn't been enabled in official Firefox builds from Mozilla.

Starting in Firefox 112 (current beta, going to release next week), though, you can put a JS file in /etc/firefox/defaults/pref/ with your customized pref values, and that should work. (If it doesn't, please file a bug that depends on bug 1170092 with details.)

You need to log in before you can comment on or make changes to this bug.