The default bug view has changed. See this FAQ.

DirectWrite nsIFontEnumerator.EnumerateFonts needs to recognize aGeneric

NEW
Unassigned

Status

()

Core
Layout: Text
7 years ago
6 years ago

People

(Reporter: sid0, Unassigned)

Tracking

(Blocks: 1 bug)

Trunk
x86
Windows 7
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

fe = Components.classes["@mozilla.org/gfx/fontenumerator;1"].createInstance(Components.interfaces.nsIFontEnumerator); fe.EnumerateFonts("x-western", "serif", {})

returns all fonts, whether serif, non-serif or monospace. Only serif fonts are returned with GDI. (This causes the font chooser to be populated with all sorts of fonts for each style.)
This is because gfxDWriteFontEntry does not implement the MatchesGenericFamily method, so it falls back to the base implementation in gfxFontEntry, which always answers "yes".
Could this explain a bunch of the reftest failures in bug 549832 where serif/sans-serif fonts got crossed?

Comment 3

6 years ago
This happens for me and I think DirectWrite is disabled (at least it says so in about:support).  Related to bug 107888?
You need to log in before you can comment on or make changes to this bug.