Closed Bug 549270 Opened 15 years ago Closed 15 years ago

dwrite font list not handling font substitutes

Categories

(Core :: Graphics, defect)

x86
Windows 7
defect
Not set
major

Tracking

()

RESOLVED FIXED

People

(Reporter: jtd, Assigned: bas.schouten)

References

(Blocks 1 open bug)

Details

(Keywords: regression)

Attachments

(2 files)

The DWrite font list InitFontList does not read in the list of substitutes as GDIFontList::InitFontList does. http://mxr.mozilla.org/mozilla-central/source/gfx/thebes/src/gfxGDIFontList.cpp#574 This means that common substitutions like Times ==> Times New Roman and Helvetica ==> Arial don't work.
Attached file simple testcase with Helvetica, Times (deleted) —
Displays correctly with Firefox 3.6, incorrectly with trunk + dwrite enabled
I'll fix this. Suppose we should add a reftest for this somehow?
Status: NEW → ASSIGNED
A reftest should be super-easy --- test uses 'Times', 'Helvetica', reference uses 'Times New Roman', 'Arial'. I guess that would break if someone modified the registry but don't worry about that. Use skip-if(MOZ_WIDGET_TOOLKIT!="windows") to make the test only run on Windows.
The test would presumably also break for any Windows users who have actual Times and Helvetica fonts installed. Maybe not all that important - I doubt many Mozilla devs have them, it'd mostly be people in the print publishing world who have deliberately installed PostScript fonts.
This should fix handling of font substitutes, attached test case works.
Attachment #429621 - Flags: review?(jdaggett)
Comment on attachment 429621 [details] [diff] [review] Handle Font Substitutes in DWrite + mFontSubstitutes.Clear(); + You also need mNonExistingFonts.Clear() here too.
Attachment #429621 - Flags: review?(jdaggett) → review+
Pushed changeset 096df1c235a2.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: