Closed Bug 1536718 Opened 2 years ago Closed 2 years ago

browser.display.use_document_fonts is not respected


(Core :: CSS Parsing and Computation, defect, P2)

68 Branch



Tracking Status
firefox-esr60 --- unaffected
firefox66 --- unaffected
firefox67 --- unaffected
firefox68 --- fixed


(Reporter: screwtape, Assigned: emilio)



(Keywords: regression)


(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0

Steps to reproduce:

Start today's nightly (68.0a1 2019-03-19, Linux 64-bit) in a new profile:

mkdir -p /tmp/temp-profile
firefox -profile /tmp/temp-profile

Preferences → General → Language and Appearance → Advanced and untick "Allow webpages to choose their own fonts, instead of my selections above".

Navigate to

Actual results:

The "Welcome to Bugzilla" heading is set in Fira Sans, as chosen by the webpage.

Expected results:

The "Welcome to Bugzilla" heading should be set in DejaVu Serif, the default selection in the "Advanced" font-selection dialog.

Regression window:

Regressed by: e05dc78eb427 Emilio Cobos Álvarez — Bug 1534494 - Try to bring some more sanity into our font code. r=manishearth

emilio, Your patch seems to cause the regression. Can you please look into this?

Blocks: 1534494
Has Regression Range: --- → yes
Has STR: --- → yes
Component: Untriaged → CSS Parsing and Computation
Ever confirmed: true
Flags: needinfo?(emilio)
Keywords: regression
OS: Unspecified → All
Product: Firefox → Core

Yes, thanks Alice (and thanks for filing Screwtape).

We don't have test coverage for this pref looks like, will make sure to add a test to avoid regressing this in the future.

Assignee: nobody → emilio
Priority: -- → P2
Duplicate of this bug: 1536720

I don't know if this is tested elsewhere, but one quirk of the use_display_fonts pref that I didn't see in the attached testcase is that it gets overruled for Unicode private-use-area glyphs, or possibly just for fonts that only contain PUA glyphs, since bug 789788 ("Not allowing pages to choose their own fonts breaks with icon fonts").

Yeah, that's the "may still fall back to document fonts" test.

Flags: needinfo?(emilio)
Duplicate of this bug: 1536574
Depends on: 1537575
Blocks: 1537575
No longer depends on: 1537575
Pushed by
Honor browser.display.use_document_fonts again. r=manishearth,jwatt
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68

Issue only partially fixed ?

Start Nightly.

Select MS Gothic as default font.

In Advanced Options, select MS Gothic for Serif, Sans Serif and Monospace.

Untick "Allow pages to choose their own fonts, instead of your selections above".

Go to and all is in MS Gothic.

Go to and nothing is in MS Gothic.

Blocks: 1539428

Has been fixed in latest version.

Yeah, this patch wasn't in the nightly build you were testing. I made the same mistake when filing bug 1539428.

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