Closed Bug 1128190 Opened 7 years ago Closed 7 years ago

Emoji text shadow uses emoji colors instead of shadow color when shadow blur = 0

Categories

(Core :: Graphics: Text, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla38
Tracking Status
firefox38 --- fixed

People

(Reporter: sole, Assigned: jfkthame)

References

()

Details

Attachments

(2 files)

When the blur is 0, the emoji shadow seems to be a duplicate of itself, which is wrong. When it's > 0, the shadow is correct--see example because in this case an image is worth 1K words.

Tested in Nightly and Stable, bug happens in both.
Added screenshot as some people on Linux cannot reproduce - maybe it's a Mac only bug!
Summary: Emoji text shadow is rendered incorrectly when shadow blur = 0 → Emoji text shadow uses emoji colors instead of shadow color when shadow blur = 0
(In reply to Soledad Penades [:sole] [:spenades] from comment #1)
> Created attachment 8557520 [details]
> screenshot of the bug on my laptop
> 
> Added screenshot as some people on Linux cannot reproduce - maybe it's a Mac
> only bug!

People who can't reproduce probably don't have a (supported) color emoji font present; AFAICS, this would happen on any platform where we are rendering the emoji as full-color glyphs.
Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
(In reply to Soledad Penades [:sole] [:spenades] from comment #1)
>  maybe it's a Mac
> only bug!

I confirmed that we get a similarly unattractive result on Windows 8.1 (where the emoji get rendered in Segoe UI Emoji).

Try run, if you'd like to test a build with this patch: https://treeherder.mozilla.org/#/jobs?repo=try&revision=4f67e21dbedc.
OS: Mac OS X → All
Hardware: x86 → All
Comment on attachment 8557537 [details] [diff] [review]
Always use a mask to render shadows for color glyphs, regardless of blur radius

Review of attachment 8557537 [details] [diff] [review]:
-----------------------------------------------------------------

r+ with or without the change below

::: gfx/thebes/gfxMacFont.h
@@ +47,5 @@
>  
> +    // In addition to the color and SVG font formats that gfxFont knows about,
> +    // check for the OS X color bitmap format.
> +    virtual bool AlwaysNeedsMaskForShadow() MOZ_OVERRIDE {
> +        return mFontEntry->HasFontTable(TRUETYPE_TAG('s','b','i','x')) ||

Seems to me we should just check sbix and CBDT on all platforms. There's no harm in it, it centralizes logic and avoids a virtual call, and is robust if we extend support for those tables across platforms.
Attachment #8557537 - Flags: review?(roc) → review+
(In reply to Robert O'Callahan (:roc) (Mozilla Corporation) from comment #5)
> Seems to me we should just check sbix and CBDT on all platforms. There's no
> harm in it, it centralizes logic and avoids a virtual call, and is robust if
> we extend support for those tables across platforms.

OK. When I wrote it, I was in two minds whether to go that way; so I'll take your suggestion as the deciding factor and simplify the patch accordingly.
https://hg.mozilla.org/mozilla-central/rev/ef54e40c0628
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
I am having the same problem even when blur is not 0.
Why is the issue marked as fixed?
Win 10, Firefox 48
(In reply to buddha-1 from comment #9)
> I am having the same problem even when blur is not 0.
> Why is the issue marked as fixed?
> Win 10, Firefox 48

I'm not seeing the problem on Win10 here, with either the current Firefox release (49) or latest Nightly (52).

As this bug has been resolved for quite a long time, it would be better to file a new bug report with details of the issue you're seeing. It'll be helpful if you include an example, and a screenshot of the incorrect result you get.
(In reply to Jonathan Kew (:jfkthame) from comment #10)
> (In reply to buddha-1 from comment #9)
> > I am having the same problem even when blur is not 0.
> > Why is the issue marked as fixed?
> > Win 10, Firefox 48
> 
> I'm not seeing the problem on Win10 here, with either the current Firefox
> release (49) or latest Nightly (52).
> 
> As this bug has been resolved for quite a long time, it would be better to
> file a new bug report with details of the issue you're seeing. It'll be
> helpful if you include an example, and a screenshot of the incorrect result
> you get.

Thank you. I filed a new bug just as you asked. You can take a look at it here https://bugzilla.mozilla.org/show_bug.cgi?id=1306585
You need to log in before you can comment on or make changes to this bug.