Closed Bug 1673098 Opened 4 years ago Closed 4 years ago

Betterment "Auto-deposit" text is shown with a weird flag instead of a hyphen

Categories

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

defect

Tracking

()

RESOLVED FIXED
84 Branch
Tracking Status
firefox-esr78 --- unaffected
firefox82 --- unaffected
firefox83 + fixed
firefox84 --- fixed

People

(Reporter: dholbert, Assigned: jfkthame)

References

(Regression)

Details

(Keywords: regression)

Attachments

(4 files)

STR:

  1. In an account at Betterment.com, view one of your "Goals" and look at the "Auto-Deposit" text

ACTUAL RESULTS:
There's a flag glyph instead of a hyphen, in the "Auto-Deposit" text. See attached screenshot.

EXPECTED RESULTS:
Hyphen.

Reduced testcase coming up.

Mozregression gives me this range:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=97770f1880a215b81e1fe806f9d6e486246bfc69&tochange=6122ff2a25ce5c45a14d3b0cf0931f85aa9e4053

which points to this being regressed by bug 1670581.

Flags: needinfo?(jfkthame)

[Tracking Requested - why for this release]: newly-introduced regression

I'm using Nightly 84.0a1 (2020-10-23) (64-bit) on Ubuntu 20.04, for what it's worth.

Huh, that's really weird. But it reproduces for me on macOS too. Will investigate.

Assignee: nobody → jfkthame
Severity: -- → S2
Component: Graphics: Text → Layout: Text and Fonts
Flags: needinfo?(jfkthame)
Priority: -- → P2

Test file that loads the webfont from the site, and displays various dash/hyphen characters.

Here, we can see that U+2010 and U+2011, which should (per bug 1670581) fall back to rendering U+002D when they're not available in the chosen font, are instead rendering the flag glyph.

Ah, I get it.... when it's a CFF font, we use the built-in harfbuzz font functions rather than our callbacks, and that means the hyphen fallback mappings don't get applied; the weird flag must be that font's .notdef glyph.

So we need to ensure we override the get_nominal_glyph function with our own version (where the fallback is implemented) for all fonts, including CFF.

Pushed by jkew@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0a6c18c6e9d5
Ensure we use our implementation of the get_nominal_glyph callback when shaping a CFF font, so that hyphen fallbacks can take effect. r=lsalzman
Pushed by malexandru@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d91eaf128119
Ensure we use our implementation of the get_nominal_glyph callback when shaping a CFF font, so that hyphen fallbacks can take effect. r=lsalzman

Re-landed the changes that were backed out since the wpt-sync that followed looks to have fixed them somehow.
Re-land link: https://hg.mozilla.org/integration/autoland/rev/d91eaf1281199ecf04e36eea1d169e1bb39c371c

Flags: needinfo?(jfkthame)
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 84 Branch

Jonathan, should we uplift this to Beta as this is an S2 bug and the fix seems to be small?

Flags: needinfo?(jfkthame)

Yes, I think it'd be good to uplift; the fix is simple and should be very safe.

Flags: needinfo?(jfkthame)

Comment on attachment 9183621 [details]
Bug 1673098 - Ensure we use our implementation of the get_nominal_glyph callback when shaping a CFF font, so that hyphen fallbacks can take effect. r=lsalzman

Beta/Release Uplift Approval Request

  • User impact if declined: Unicode hyphens may be mis-rendered by some webfonts
  • Is this code covered by automated tests?: Yes
  • 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): Simple fix to ensure we apply a fallback character mapping to CFF as well as TTF fonts; should have no effect on any other characters than the Unicode hyphens we're targeting here.
  • String changes made/needed:
Attachment #9183621 - Flags: approval-mozilla-beta?

Comment on attachment 9183621 [details]
Bug 1673098 - Ensure we use our implementation of the get_nominal_glyph callback when shaping a CFF font, so that hyphen fallbacks can take effect. r=lsalzman

Approved for 83 beta 6, thanks.

Attachment #9183621 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: