Closed Bug 839956 Opened 7 years ago Closed 7 years ago

underlines in SVG text drawn with the wrong size

Categories

(Core :: SVG, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla23

People

(Reporter: heycam, Assigned: heycam)

References

Details

Attachments

(2 files, 1 obsolete file)

With svg.text.css-frames.enabled true, text decorations don't seem to be rendered with the correct thickness.  Try opening layout/reftests/svg/text/simple-underline.txt and pressing {Cmd,Ctrl}+Plus and notice that the underline stays at its original thickness.
Duplicate of this bug: 842144
See http://www.w3.org/Graphics/SVG/Test/20110816/harness/htmlObjectApproved/text-text-03-b.html too where the decoration is basically invisible when the SVG document is shown embedded in the html page but appears when you select view in tab.
Also if you view http://www.w3.org/Graphics/SVG/Test/20110816/svg/text-text-03-b.svg the strike through decoration is not positioned correctly.

If I disable font size scaling by making UpdateFontSizeScaleFactor return early, then the decorations all look OK.
Blocks: svgtext
Summary: underlines in SVG text drawn with the wrong size when full page zoom is active → underlines in SVG text drawn with the wrong size
Attached patch patch for size (obsolete) — Splinter Review
The font size scale factor should not have taken the CSS:device pixel ratio into account.  This fixes the decoration thickness, but not the position of the strike through decoration, which I'll look into with a separate patch.
Assignee: nobody → cam
Status: NEW → ASSIGNED
Attachment #735686 - Flags: review?(longsonr)
Attached patch patch for sizeSplinter Review
Attachment #735686 - Attachment is obsolete: true
Attachment #735686 - Flags: review?(longsonr)
Attachment #735687 - Flags: review?(longsonr)
Blocks: 839957
Attachment #735687 - Flags: review?(longsonr) → review+
Text decoration size/position is currently only correct when mFontSizeScaleFactor is 1.  The patch above just ensures that we get 1 for normal-ish font-sizes on text that hasn't been scaled.
Here's the solution for that.  We weren't getting in to the nsLayoutUtils::GetInflationFor code that looks at the SVG text's font size scale factor.  So get it here, when we get the inflated metrics for text decorations.
Attachment #736155 - Flags: review?(roc)
https://hg.mozilla.org/mozilla-central/rev/ebbf1484ca37
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla23
You need to log in before you can comment on or make changes to this bug.