Closed Bug 1464400 Opened 2 years ago Closed 2 years ago

Add a CSSGeneric attribute to InspectorFontFace

Categories

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

enhancement
Not set

Tracking

()

RESOLVED FIXED
mozilla62
Tracking Status
firefox62 --- fixed

People

(Reporter: jfkthame, Assigned: jfkthame)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

It would be useful for the DevTools font inspector to be able to show when a particular font face was the result of resolving a CSS generic font-family value (serif, sans-serif, etc) rather than the family being explicitly named in the font-family list.

The effective mapping from CSS generics to font families is dependent on the lang of the element, the current settings of font.name-list.<generic>.<lang> prefs, the font whitelist in effect (if any), and the fonts actually present on the system, so it would be pretty hard for devtools to implement some kind of reverse-mapping from the font faces actually used to the generics found in the font-family property. But I think we can fairly easily keep track of generics through the font-matching process so that when getUsedFontFaces reports the fonts used in a range, it can include a CSSGeneric attribute on any faces that were the result of resolving a generic family name.
Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Attachment #8980577 - Flags: review?(jwatt) → review+
Pushed by jkew@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/f8dbb1d2d07c
Keep track of CSS generics when resolving to actual font families and faces, and expose as a new CSSGeneric attribute on InspectorFontFace. r=jwatt
Pushed by jkew@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/9eabcc7a5eae
Keep track of CSS generics when resolving to actual font families and faces, and expose as a new CSSGeneric attribute on InspectorFontFace. r=jwatt
Re-landed this, as the real culprit was the other patch in the same push (bug 1463115).
Flags: needinfo?(jfkthame)
https://hg.mozilla.org/mozilla-central/rev/9eabcc7a5eae
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
You need to log in before you can comment on or make changes to this bug.