Closed Bug 335543 Opened 20 years ago Closed 18 years ago

Don't use PangoWeight values outside the permissible range (100..900)

Categories

(Core Graveyard :: GFX: Gtk, defect)

x86
Linux
defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.9alpha6

People

(Reporter: dsantani, Assigned: dsantani)

References

()

Details

Attachments

(1 file)

User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.0.1) Gecko/20060313 Fedora/1.5.0.1-9 Firefox/1.5.0.1 pango-text Build Identifier: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.0.1) Gecko/20060313 Fedora/1.5.0.1-9 Firefox/1.5.0.1 pango-text The function "PangoWeight CalculateWeight (PRUint16 aWeight) " in nsFontMetricsPango.cpp is returning *999* as one of the return values, but as per the *PangoWeight enum* defined in Pango API (reference link below), the maximum permissible return value is *900*. Link for Pango API (PangoWeight enum) http://pango.org/manual/pango-Fonts.html#id2926866 Reproducible: Always
I blame blizzard. :) (If you intend to fix this bug, please feel free to assign it to yourself!)
I can fix this issue. Please assign this bug to me.
Assignee: nobody → dsantani
gfx/src/gtk/nsFontMetricsPango.cpp have been removed on trunk, but the code in the function ThebesStyleToPangoWeight() in gfx/thebes/src/gfxPangoFonts.cpp seems to be identical so I'm guessing this is still a problem on trunk. http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/gfx/thebes/src/gfxPangoFonts.cpp&rev=1.84&root=/cvsroot&mark=358#311
Attached patch Patch rev. 1Splinter Review
Like so?
Attachment #268666 - Flags: superreview?(vladimir)
Attachment #268666 - Flags: review?(vladimir)
Attachment #268666 - Flags: superreview?(vladimir)
Attachment #268666 - Flags: superreview+
Attachment #268666 - Flags: review?(vladimir)
Attachment #268666 - Flags: review+
Checked in to trunk at 2007-06-18 20:08 PDT. -> FIXED
Severity: normal → minor
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Summary: Code Error in nsFontMetricsPango.cpp → Don't use PangoWeight values outside the permissible range (100..900)
Target Milestone: --- → mozilla1.9alpha6
Flags: in-testsuite-
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: