Closed Bug 1659258 Opened 4 years ago Closed 4 years ago

Ensure that SetupFamilyCharmap always sets the mCharacterMap pointer

Categories

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

defect

Tracking

()

RESOLVED FIXED
82 Branch
Tracking Status
firefox82 --- fixed

People

(Reporter: jfkthame, Assigned: jfkthame)

References

Details

Attachments

(1 file)

Currently if SetupFamilyCharmap finds a face that is lacking a shared-cmap record, it bails out, leaving the family's charmap unset. This is bad because we will then repeatedly try to set the family's charmap during font fallback searches, killing performance.

Instead we should ensure we always set the family charmap, even if we're setting it to empty because all the faces had broken/unusable cmaps; this just means the family will be skipped during searches, which is fine -- it doesn't have any faces we can actually use.

(This can happen on Linux where fontconfig may expose fonts in legacy formats that don't actually have cmap tables. We probably want to exclude these from the font list earlier if we can do so reliably, but in any case fixing SetupFamilyCharmap means they won't cripple fallback searches.)

Pushed by jkew@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/92b5dfe764cc Ensure that SetupFamilyCharmap always sets the mCharacterMap pointer, even if empty, so that we don't repeatedly call it for fonts we can't actually use. r=jwatt
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 82 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: