Closed Bug 1745715 Opened 3 years ago Closed 3 years ago

Bundled fonts should have Base visibility even when they are also system-wide installed

Categories

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

Firefox 91
Desktop
Linux
defect

Tracking

()

RESOLVED FIXED
97 Branch
Tracking Status
firefox-esr91 --- fixed
firefox96 --- fixed
firefox97 --- fixed

People

(Reporter: pierov, Assigned: pierov)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

Bundled fonts that are also installed at system level are not added twice.
However, this can result in the wrong visibility (at least on Ubuntu and Fedora), which in turn can be a problem with privacy.resistFingerprinting set to true.

Attached patch fonts.patchSplinter Review
Assignee: nobody → pierov

Jonathan: does the approach in the patch look reasonable?

Flags: needinfo?(jfkthame)

Seems like that would work; but I wonder if we should instead just swap the order of the two calls to AddFontSetFamilies at https://searchfox.org/mozilla-central/rev/4646b826a25d3825cf209db890862b45fa09ffc3/gfx/thebes/gfxFcPlatformFontList.cpp#1820-1829, so that the fonts from FcSetApplication are considered first.

I've pushed a try build at https://treeherder.mozilla.org/jobs?repo=try&revision=23e14ec6ad0f35428eb5e382ef3b458d802326fc to check if this breaks anything unexpected....

Flags: needinfo?(jfkthame)

Pier and/or Georg, could you confirm whether the alternative patch here (comment 4) resolves the problem you're seeing? Thanks.

Flags: needinfo?(pierov)

Yep, it works flawlessly. Thank you!

Flags: needinfo?(pierov)
Pushed by jkew@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d1c894f81d2a Process app-bundled fonts before system fonts when initializing the font list, to ensure their families get the expected Base visibility level. r=emilio
Severity: -- → S3
Priority: -- → P3
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 97 Branch

Would it be possible to backport the fix to Firefox ESR91?
Thanks

Flags: needinfo?(jfkthame)

Comment on attachment 9255095 [details]
Bug 1745715 - Process app-bundled fonts before system fonts when initializing the font list, to ensure their families get the expected Base visibility level. r=#layout-reviewers

ESR Uplift Approval Request

  • If this is not a sec:{high,crit} bug, please state case for ESR consideration: When restrictions on installed font use are enabled (e.g. in Tor browser, or for other privacy-focused configurations), fonts bundled with the browser (e.g. the TwEmoji Mozilla font we ship) may incorrectly be made unavailable.
    Uplifting this patch to esr91 will avoid the need for Tor and other distributions to maintain local fixes to ensure fonts work for their users.
  • User impact if declined: Browser-bundled fonts unexpectedly blocked in some configurations.
  • Fix Landed on Version: 97
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Simple re-ordering of font initialization to ensure bundled font families are correctly categorized.
  • String or UUID changes made by this patch:
Flags: needinfo?(jfkthame)
Attachment #9255095 - Flags: approval-mozilla-esr91?

Comment on attachment 9255095 [details]
Bug 1745715 - Process app-bundled fonts before system fonts when initializing the font list, to ensure their families get the expected Base visibility level. r=#layout-reviewers

Approved for 96.0b6 and 91.5esr.

Attachment #9255095 - Flags: approval-mozilla-esr91?
Attachment #9255095 - Flags: approval-mozilla-esr91+
Attachment #9255095 - Flags: approval-mozilla-beta+
Regressed by: 1792157
No longer regressed by: 1792157
Regressions: 1792157
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: