Open Bug 1229982 Opened 9 years ago Updated 2 years ago

Shadow of decoration is not drawn when shadow blur is applied if text is higher than the baseline

Categories

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

defect

Tracking

()

People

(Reporter: xidorn, Unassigned)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file, 1 obsolete file)

Attached file testcase (obsolete) —
See the attachment.

When there is any shadow blur, the shadow of decoration may not be drawn properly, when text has not intersection with the decoration line. This also affects text emphasis marks because text emphasis marks never have intersection with the original text.
This issue also happens with overline and subscript.
Attached file testcase
Add the case with overline and subscript.
Attachment #8695036 - Attachment is obsolete: true
I try to expand the height of shadowRect[1] by 3 times, and the shadow of underline is shown. But the overline is still missing.

[1]: http://searchfox.org/mozilla-central/source/layout/generic/nsTextFrame.cpp#6205-6208
Hi Xidon, do you know where is the code to calculate the position of decoration line? I think we try to get the position of decoration line first to create a larger draw target. And I'm also interested in the framePt[1]. What is it mean?

[1]: http://searchfox.org/mozilla-central/source/layout/generic/nsTextFrame.h#402
Flags: needinfo?(xidorn+moz)
s/What is it mean/What does it mean
(In reply to Tommy Kuo [:KuoE0] from comment #4)
> Hi Xidon, do you know where is the code to calculate the position of
> decoration line?

The calculation code is in nsTextFrame::GetTextDecorations.

> And I'm also interested in the framePt[1]. What is it mean?

IIRC, framePt is the start point of the baseline of the text, but I could be wrong.
Flags: needinfo?(xidorn+moz)
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: