Closed Bug 1063622 Opened 10 years ago Closed 10 years ago

On a Mac, Firefox produces garbage for certain emoji characters.

Categories

(Core :: Graphics: Text, defect)

31 Branch
x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 923007

People

(Reporter: mark, Unassigned)

References

()

Details

Attachments

(2 files)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.24 Safari/537.36

Steps to reproduce:

On a Mac
Open up http://絵文字-
Attachment #8485058 - Attachment description: Screen Shot 2014-09-05 at 13.30.29.png → Screenshot of expected results (Safari)
Attachment #8485060 - Attachment description: FF screen shot (other is Safari) → Screenshot of actual results (Firefox)
Component: Internationalization → Graphics: Text
Mark, unfortunately this version of bugzilla doesn't allow entry of SMP characters - the MySQL version in use is too old :(. Hence, your URL in comment 0 is truncated. Could you please provide it in %-escaped UTF-8 or punycode form?


(An aside: I tried looking for a link via http://unicode-inc.blogspot.co.uk/2014/09/iuc-38-keynote-presenter-announced.html, but didn't find it there. However, I noticed an emoji issue on that page too; try hovering over the image of the title to see its tooltip. In this case there's an authoring problem: the page source has

  <img alt="絵文字 : &#55356;&#57328;, &#55356;&#57217;, and &#55357;&#56960; = Emoji: Past, Present, and Future" src="http://www.unicode.org/announcements/Emoji-Keynote-306x37.png" height="37" style="border-width: 0px;" title="絵文字 : &#55356;&#57328;, &#55356;&#57217;, and &#55357;&#56960; = Emoji: Past, Present, and Future" width="306" /></a>

which encodes the emoji characters as separate character entities for their high and low surrogates. When using entities, they should instead be encoded directly as their SMP codepoints.)
I'm pretty sure this is triggered by the use of the emoji-style variation selector to force emoji representation of the HOT BEVERAGE symbol, which is in one of the BMP symbol blocks rather than the main emoji block:

<h1 class='title'>
絵文字-&#9749;&#65039;
</h1>

Without the &#65039;, it would likely render the b/w glyph from a font such as Menlo.

If you explicitly choose the Apple Color Emoji font, it'd probably render the color glyph as expected; e.g. by wrapping it in a <span style="font-family:Apple Color Emoji">...</span>.

The problem arises (I believe) because the presence of the variation selector is causing Core Text to do an internal font switch during glyph generation, but Gecko is unaware of this and so renders the resulting glyph IDs from the wrong font.

(I thought we already had a bug report on this, but can't find it offhand.)
Ah, see bug 923007. I suspect this is the same issue.
(In reply to Jonathan Kew (:jfkthame) from comment #2)
> Mark, unfortunately this version of bugzilla doesn't allow entry of SMP
> characters - the MySQL version in use is too old :(. Hence, your URL in
> comment 0 is truncated. Could you please provide it in %-escaped UTF-8 or
> punycode form?
> 
> 
> (An aside: I tried looking for a link via
> http://unicode-inc.blogspot.co.uk/2014/09/iuc-38-keynote-presenter-announced.
> html, but didn't find it there. However, I noticed an emoji issue on that
> page too; try hovering over the image of the title to see its tooltip. In
> this case there's an authoring problem: the page source has
> 
>   <img alt="絵文字 : &#55356;&#57328;, &#55356;&#57217;, and &#55357;&#56960; =
> Emoji: Past, Present, and Future"
> src="http://www.unicode.org/announcements/Emoji-Keynote-306x37.png"
> height="37" style="border-width: 0px;" title="絵文字 : &#55356;&#57328;,
> &#55356;&#57217;, and &#55357;&#56960; = Emoji: Past, Present, and Future"
> width="306" /></a>
> 
> which encodes the emoji characters as separate character entities for their
> high and low surrogates. When using entities, they should instead be encoded
> directly as their SMP codepoints.)

That's blogspot's doing... I'll file a bug for that.
Closing this as a duplicate of bug 923007, as I believe it's the same problem as described there. Mark, I've just posted an experimental build with a patch that may help to avoid the garbage rendering here; see bug 923007 comment 15. If you could test that build and let me know the result, I'd appreciate it - thanks.
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
Thanks, that was fast!

Sorry, I can't test it for you because the Mac is my work machine, and I can't download arbitrary images. I hope someone else can test it.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: