Closed Bug 1645524 Opened 11 months ago Closed 11 months ago

@font-face src:local(...) lookups fail on Win7 until the delayed font-loader task has completed

Categories

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

Unspecified
Windows
defect

Tracking

()

RESOLVED FIXED
mozilla79
Tracking Status
firefox79 --- fixed

People

(Reporter: jfkthame, Assigned: jfkthame)

References

Details

Attachments

(1 file)

Try runs with gfx.e10s.font-list.shared set to true show a couple of failures on reftests that involve @font-face with src:local(...), only on Win7.

Investigation shows that this is because FontList::SearchForLocalFace, which is used to implement src:local(...) lookups before the full set of face names has been stored in the shared font list, fails to find any names on Win7, although it works fine on Win10.

The reason for this is that gfxDWriteFontList::ReadFaceNames, which is supposed to read face names for this purpose, is somewhat broken. It is designed to use GetDirectWriteFaceName(), and fall back to manually reading strings from the 'name' table if this fails (as happens on older Win7 versions), and should return true if either the psname and/or fullname was found. However, the logic to set the return value is broken, such that it fails to actually set it to true after manually reading the names, and the caller assumes no names were found.

Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Pushed by jkew@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f92ec29f06ec
Correctly set the return value of gfxDWriteFontList::ReadFaceNames to support src:local(...) face search. r=jwatt
Status: ASSIGNED → RESOLVED
Closed: 11 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla79
You need to log in before you can comment on or make changes to this bug.