Closed Bug 2047675 Opened 4 months ago Closed 4 months ago

Astral plane characters showing as blank boxes

Categories

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

Firefox 151
defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: distler, Unassigned)

References

Details

Attachments

(3 files)

Attached file AstralTest.xhtml —

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:151.0) Gecko/20100101 Firefox/151.0

Steps to reproduce:

View test file

Actual results:

Astral plane characters display as blank boxes. (See Firefox rendering.)

Expected results:

Should have displayed the characters. (See Safari rendering.)

Attached image Firefox rendering —
Attached image Safari rendering —

The Bugbug bot thinks this bug should belong to the 'Core::Widget: Cocoa' component, but is not confident enough to move the bug to that component.

Component: Untriaged → General

The macOS-specific path that explicitly handles astral-plane characters lives here:

• gfx/thebes/CoreTextFontList.cpp (especially PlatformGlobalFontFallback)
• Uses CTFontCreateForString (Core Text / Cocoa) with a surrogate-pair CFString for non-BMP codepoints (H_SURROGATE / L_SURROGATE + length=2).
• Rejects "LastResort" / ".LastResort" families.
• Then does family lookup + HasCharacter (cmap) check.
• Called from gfxPlatformFontList::GlobalFontFallback / SystemFindFontForChar.
• Related: gfxFontGroup::FindFontForChar, gfxFontEntry::HasCharacter / ReadCMAP, gfxMacPlatformFontList.mm, gfxCoreTextShaper.cpp.
• Cmap loading supports the necessary formats (including format 12/13 for >U+FFFF).

Component: General → Widget: Cocoa
Product: Firefox → Core

Tentatively moving this to "Layout: Text and Fonts" for a look.

Component: Widget: Cocoa → Layout: Text and Fonts

Hm, Intel Mac with Sequoia, with 151.0 through mozregression, doesn't have that issue.
Right clicking on the text, clicking inspect, going to the "Fonts" tab on the rightmost pane (Which may be hidden in the rightmost arrow menu), what is the font being used for the text? It shows "STIX Two Math" on Sequoia.

Flags: needinfo?(distler)

Geneva and Symbol (Apple Silicon on Tahoe). Mind you, STIX Two Math is available and I believe that's what Safari uses.

Flags: needinfo?(distler)

Hm, bug 1902570 added that font as a standard font for 13 and up. Wonder if it can/should be extended back..
(EDIT: Oh, reporter is on Tahoe. The UA string: "Macintosh; Intel Mac OS X 10.15" threw me off)

Severity: -- → S3
See Also: → 1902570

I have an Apple Silicon MacBook running Tahoe, and I get STIX Two Math used for both letters in the example. Not sure why it'd be different for the reporter here.

Umh. OK. That's weird. I just updated to Firefox 152.0.1 (from 151.0.x). And the problem went away. Example now displaying with STIX Two Math.

Status: UNCONFIRMED → RESOLVED
Closed: 4 months ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: