Open Bug 550445 Opened 14 years ago Updated 1 year ago

DirectWrite nsIFontEnumerator.EnumerateFonts needs to recognize aGeneric


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

Windows 7




(Reporter: rain1, Unassigned)


(Blocks 1 open bug)


fe = Components.classes[";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?
This happens for me and I think DirectWrite is disabled (at least it says so in about:support).  Related to bug 107888?
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.