Closed Bug 1827950 Opened 1 year ago Closed 1 year ago

Text becomes transparent on various sites, when a bitmap version of a font (e.g. Helvetica) is present

Categories

(Core :: Graphics: Text, defect)

Firefox 112
Unspecified
Linux
defect

Tracking

()

VERIFIED FIXED
114 Branch
Tracking Status
relnote-firefox --- 112+
firefox-esr102 --- unaffected
firefox112 + verified
firefox113 + verified
firefox114 --- verified

People

(Reporter: yoasif, Assigned: jfkthame)

References

(Regression)

Details

(Keywords: regression)

Attachments

(4 files)

Attached image bad-text.png

From https://www.reddit.com/r/firefox/comments/12jm9ju/on_firefox_112_font_goes_white_on_some_sites_linux/ and various other places on the web.

Steps to reproduce:

  1. Navigate to https://uk-ua.facebook.com/
  2. click on the "+" icon near "हिन्दी"

What happens:

Various areas of text are missing. See screenshot.

Expected result:

As before bug 1817184.

I can't reproduce this bug, but I have attached the about:support of someone who can.

Attached file about:support
Attached image good text
Has STR: --- → yes
Keywords: regression
Regressed by: 1817184

PS: This may be related, hard to know: https://support.mozilla.org/en-US/questions/1410548

Set release status flags based on info from the regressing bug 1817184

:jfkthame, since you are the author of the regressor, bug 1817184, could you take a look? Also, could you set the severity field?

For more information, please visit auto_nag documentation.

This seems quite weird - the only thing I can think of is that maybe some users have a font (maybe an ancient version of Helvetica, for example) that isn't giving us valid extents, and so we end up clipping away all the text using that font because we think it isn't visible.

Assuming the regression range is valid, it does seem quite a serious issue (missing text!), though hopefully only affecting a small minority of people with a particular font that is triggering the issue.

Severity: -- → S2
Flags: needinfo?(jfkthame)
Assignee: nobody → jfkthame
Status: NEW → ASSIGNED

The patch here is quite speculative at this point, as I have not reproduced the issue; but it should at least be safe, and if we get it landed, maybe we can get an affected user to try a Nightly build and confirm whether it helps.

See Also: → 1827465

Hi. This is my attached screenshot of the issue and about:support.
I assume that only bitmap fonts are not displayed. When I deleted the directories containing Helvetica (for my void linux: /usr/share/fonts/X11/100dpi and /usr/share/fonts/X11/75dpi), firefox started using ttf fonts like Liberation, which work fine.

Pushed by jkew@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/18b8f731cb69
Don't attempt to use font extents if we didn't get a valid 'head' table, or if it's not an sfnt resource. r=lsalzman

Another example page where I am seeing this, with parts typeset in Helvetica:

https://alwaysprocessing.blog/2022/02/20/size-matters

I don't have real Helvetica installed, but I perhaps it is trying to substitute with Arial installed with Debian's ttf-mscorefonts-installer.

This issue makes surprisingly large number of web sites totally unreadable!

There's a test build with the patch here available at:

https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/bRfWOwu_Sje4ImlGwtJDKA/runs/0/artifacts/public/build/target.tar.bz2

It should work to download the archive and extract the contents to a local folder, and then find the enclosed firefox executable and launch it -- no need to install or replace your existing version. Be sure to fully quit any running copy of firefox, though, to avoid confusion (otherwise, I think it may open a new window in the existing version instead of running the new one).

Comments in bug 1827465 suggest this should fix the problem.

Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 114 Branch
Duplicate of this bug: 1827465

Comment on attachment 9328416 [details]
Bug 1827950 - Don't attempt to use font extents if we didn't get a valid 'head' table, or if it's not an sfnt resource. r=lsalzman

Beta/Release Uplift Approval Request

  • User impact if declined: Text using old bitmap (X11) fonts (and likely other legacy formats such as Type1) renders as blank on Linux
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Just adds check that we can actually get valid extents from the font resource, before using this to optimize painting
  • String changes made/needed:
  • Is Android affected?: No
Attachment #9328416 - Flags: approval-mozilla-beta?

Comment on attachment 9328416 [details]
Bug 1827950 - Don't attempt to use font extents if we didn't get a valid 'head' table, or if it's not an sfnt resource. r=lsalzman

Approved for 113.0b4.

Attachment #9328416 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Comment on attachment 9328416 [details]
Bug 1827950 - Don't attempt to use font extents if we didn't get a valid 'head' table, or if it's not an sfnt resource. r=lsalzman

Beta/Release Uplift Approval Request

  • User impact if declined: Text missing (blank) for some Linux users on some pages (dependent on having legacy-format local fonts, but that's not obvious to the user)
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Just adds check that we can actually get valid extents from the font resource, before using this to optimize painting
  • String changes made/needed: none
  • Is Android affected?: No
Attachment #9328416 - Flags: approval-mozilla-release?

Given the failure mode here (text totally invisible) and the fact that we've seen a number of reports from affected users, I think we should consider this for a 112.0.x ride-along, if there's to be a dot-release sometime before 113 comes out.

Duplicate of this bug: 1828272
See Also: → 1828474
Flags: qe-verify+
QA Whiteboard: [qa-triaged]
Duplicate of this bug: 1828633
Summary: Text becomes transparent on various sites, e.g. when a webfont → Text becomes transparent on various sites, when a bitmap version of a font (e.g. Helvetica) is present

I can't reproduce this issue on my end on my Ubuntu machine on Fx 112. Pablo or aaq7for can any of you help us with a fix confirmation on latest beta?

Flags: needinfo?(pablo)
Flags: needinfo?(aaq7for)

Release Note Request (optional, but appreciated)
[Why is this notable]: Linux users with bitmap fonts installed may have had entire sections of text invisible on some sites
[Affects Firefox for Android]: no
[Suggested wording]:
[Links (documentation, blog post, etc)]:

Alias: regression
relnote-firefox: --- → ?
Duplicate of this bug: 1828345
Blocks: 1829261
Alias: regression
Duplicate of this bug: 1829409

Comment on attachment 9328416 [details]
Bug 1827950 - Don't attempt to use font extents if we didn't get a valid 'head' table, or if it's not an sfnt resource. r=lsalzman

Approved for 112.0.2 dot release

Attachment #9328416 - Flags: approval-mozilla-release? → approval-mozilla-release+

I couldn't manage to reproduce this issue also on my end in order to verify it on Firefox 112.0.2 dot release or on previous fixed builds.
It would be great if anyone on this bug who managed to reproduce it could verify the fix also.
aaq7fo or pablo if you have a couple of minutes to help us on this one please.
Thank you!

Flags: needinfo?(pablo)
Flags: needinfo?(pablo)
No longer blocks: 1829261
Duplicate of this bug: 1829261

(In reply to Hani Yacoub, Desktop QA from comment #27)

aaq7fo or pablo if you have a couple of minutes to help us on this one please.
Thank you!

I think @aaq7for checked this for you & just replied on the wrong bug (bug 1829261) by accident. In bug 1829261 comment 5 they said:

@hyacoub 112.0.2 works fine with Helvetica bitmap font

(I'll leave their needinfo open in case they want to add any additional details/confirmation)

Blocks: 1829946
No longer blocks: 1829946
Duplicate of this bug: 1829946

I also received from @aaq7for the confirmation of the fix via email.
Closing this bug as verified.
Thanks.

Status: RESOLVED → VERIFIED
QA Whiteboard: [qa-triaged]
Flags: qe-verify+
Flags: needinfo?(pablo)
Flags: needinfo?(aaq7for)
Duplicate of this bug: 1828474
Duplicate of this bug: 1828785
See Also: → 1827996
Duplicate of this bug: 1827996
Duplicate of this bug: 1828233
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: