Closed Bug 555930 Opened 14 years ago Closed 14 years ago

dwrite font code fails to initialize superscriptOffset

Categories

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

x86
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jfkthame, Unassigned)

Details

Attachments

(1 file)

gfxDWriteFont::ComputeMetrics leaves the superscriptOffset field of the Metrics structure undefined due to a typo (it sets subscriptOffset to zero twice, instead).

In addition, gfxFont::SanitizeMetrics does not handle this failure effectively, as it fails to check for ridiculous negative values of super- and subscriptOffset, only for zero or excessive positive values.

This patch corrects the typo in gfxDWriteFont::ComputeMetrics and makes SanitizeMetrics more robust.
Attachment #435870 - Attachment is patch: true
Attachment #435870 - Attachment mime type: application/octet-stream → text/plain
Attachment #435870 - Flags: review?(bas.schouten)
Attachment #435870 - Flags: review?(bas.schouten) → review+
http://hg.mozilla.org/mozilla-central/rev/75807ac9d889
Status: NEW → RESOLVED
Closed: 14 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: