Closed Bug 1687622 Opened 3 years ago Closed 3 years ago

[macOS] Unicode profile shows boxes then "loads" itself on Nightly 86

Categories

(Toolkit :: Startup and Profile System, defect)

Firefox 86
Desktop
macOS
defect

Tracking

()

VERIFIED FIXED
87 Branch
Tracking Status
firefox-esr78 --- unaffected
firefox85 --- unaffected
firefox86 --- wontfix
firefox87 --- verified
firefox88 --- verified

People

(Reporter: csasca, Assigned: jfkthame)

References

(Regressed 1 open bug, Regression)

Details

(Keywords: regression)

Attachments

(2 files)

Affected versions

  • Firefox 86.0a1

Affected platforms

  • macOS 10.15.7

Steps to reproduce

  1. Launch Firefox profile manager
  2. Add an unicode profile, for example: ߂߃߄߅߆߇߈
  3. Relaunch profile manager

Expected result

  • The unicode profile is loaded instantly

Actual result

  • The unicode profile shows some boxes, and after 2 seconds it "loads" itself

Regression range

  • I will see for a regression

Additional notes

  • The issue can be seen in the following attachment
  • Windows and Ubuntu are not affected
  • This issue may lead to a profile corruption
Has Regression Range: --- → no
Has STR: --- → yes

Jonathan, is this from the font changes in bug 1676966?

Flags: needinfo?(jfkthame)

(In reply to Catalin Sasca, QA [:csasca] from comment #0)

  • This issue may lead to a profile corruption

Why do you say this?

Flags: needinfo?(catalin.sasca)

(In reply to Dave Townsend [:mossop] from comment #1)

Jonathan, is this from the font changes in bug 1676966?

Yes, it would be. The "߂߃߄߅߆߇߈" characters aren't supported by the default system fonts, so we do a font fallback search to try and render them, and since bug 1676966 we no longer block rendering on that search; instead we refresh once it completes.

In practice, I doubt very many users have N'ko profile names. :)

I don't think this introduces any risk of corruption; it's purely a visual issue.

Flags: needinfo?(jfkthame)
QA Whiteboard: [qa-regression-triage]

Although there is a small probability that users will use N'ko profiles, I was suspecting this could be a profile corruption issue, not a rendering one.

Flags: needinfo?(catalin.sasca)

One thing we can do that will fix this particular case (though not every possible example of using "unusual" Unicode characters) is to add more of the Noto fonts that Apple now ships to the "common fallbacks" list, so that they're found without hitting the global fallback codepath.

(It's a bit weird, actually, as Font Book doesn't show Noto Sans Nko -- or many others of the Noto fonts -- as being present at all; but on checking, it's there in /System/Library/Fonts/Supplemental/, and indeed gets used by both Safari and Firefox here.)

What I think we should do here, to take advantage of a lot more of the fonts that macOS now ships (mostly Noto faces) for more obscure languages/scripts, is to rewrite gfxPlatformMac::GetCommonFallbackFonts to work primarily from the resolved script run of the text being processed, instead of the rather ad hoc assignment of fonts based on blocks of Unicode codepoints. That approach doesn't scale well to supporting the large number of separate scripts that now have appropriate fallback fonts available.

In the process of investigating this, I also found that there are some oddities about the macOS font APIs: in particular, whether the fonts shipped in /System/Library/Fonts/Supplemental/ are exposed by CTFontManagerCopyAvailableFontFamilyNames depends on what SDK version was used to build the application. With SDK 10.14, the "supplemental" fonts show up in the list; but when the exact same code is built with SDK 10.15, they're absent by default, and only appear in the list if they are explicitly activated using CTFontManagerRegisterFontsForURLs or similar API. So to ensure consistent results regardless of the SDK used to build, we should do that activation during startup (as we do on older OS versions where they're found under /Library/Application Support/).

Regressed by: 1676966
Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Pushed by jkew@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f7fc57b92765
Rewrite macOS version of GetCommonFallbackFonts to handle a lot more language fonts that ship with the OS. r=m_kato
https://hg.mozilla.org/integration/autoland/rev/4d42ff607081
Activate fonts for additional language support from their new location on Big Sur. r=m_kato
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 87 Branch
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Target Milestone: 87 Branch → ---

I just did a new try run at https://treeherder.mozilla.org/jobs?repo=try&revision=6413a07a4bf27b2c2228b927228afc3d496dbff6 and was not able to reproduce the leak reported in bug 1688804 despite multiple retriggers. So I'm going to try re-landing this.

Flags: needinfo?(jfkthame)
Pushed by jkew@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/831b1df31101
Rewrite macOS version of GetCommonFallbackFonts to handle a lot more language fonts that ship with the OS. r=m_kato
https://hg.mozilla.org/integration/autoland/rev/c82598fe3c17
Activate fonts for additional language support from their new location on Big Sur. r=m_kato
Status: REOPENED → RESOLVED
Closed: 3 years ago3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 87 Branch
Regressions: 1690192
No longer depends on: 1690877
Regressions: 1690877
Regressions: 1692220
No longer regressed by: 1691719
Regressions: 1691719
Flags: qe-verify+

Verified this issue on Firefox 87.0 and 88.0a1 (2021-03-18).

Status: RESOLVED → VERIFIED
Flags: qe-verify+
Regressions: 1706819
Regressions: 1707109
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: