Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm trying to display Emoji Characters inside my XeLaTeX Document. It seems to work for some glyphs like the numbers and pound sign but not for all. Here is a MWE:

\documentclass{scrartcl} 
\usepackage{fontspec}

\setmainfont{Apple Color Emoji} % The emoji Font 

\begin{document}
\char"0030{}  %Works
\char"1F60D{} % Doesent Work should out put SMILEY FACE WITH HEART SHAPED EYES
\end{document}

What is the reason for this strange behavior and is there a way to include Emojis in XeLaTeX?

Edit: selected emjoi

It seems the Character is there. It is selectable but not visible. I can copy&paste it.

share|improve this question
    
How doesn't it work? Fails to compile? Wrong glyph? No glyph? Are there error messages in the .log file that would help us? –  Seamus Dec 27 '12 at 13:48
    
Welcome to TeX.SX. –  Claudio Fiandrino Dec 27 '12 at 13:56
    
@Seamus It does compile without any warnings beside the LaTeX warning: "xparse/redefine-command". It is just that the glyph is not there. The first one (an zero) is there but there is no smiley face. –  lemen Dec 27 '12 at 13:59
    
To expand on Minustar's answer, if you find an appropriate graphic (vector glyph or otherwise), you can incorporate it as a macro that scales with fontsize using this answer: tex.stackexchange.com/questions/224357/… –  Steven B. Segletes Jan 30 at 13:39
    
Is not a characters, but look this post: [Something between \frownie and \smiley][1]. [1]: tex.stackexchange.com/questions/58901/… –  Giacomo Alessandroni Jan 31 at 17:13

3 Answers 3

up vote 3 down vote accepted

Apple's emoji aren't encoded as normal characters do. They are in fact some PNG-like images embedded in some proprietary table in the AppleEmoji font. There is no reason to ever expect support of this Apple(tm) feature in XeLaTeX.

You might try to google if someone has found a way to export the smileys as separate images and import them in your document.

Or you might try an alternative based on other fonts that properly encode the characters as vector glyphs.

share|improve this answer

XeTeX can display black and white Emoji character just fine, provided that the font supports them.

Coloured Emojis however are much trickier, there weren’t any standard ways for fonts to include coloured glyphs prior to the standardisation of Emoji, so each company came with its own way; Apple (sbix table, embedded coloured bitmaps), Google (CBDT & CBLC, embedded coloured bitmaps), Microsoft (CPAL & COLR tables, scalable glyph layers) and Mozilla / Adobe (SVG table, embedded full SVG graphics in the fonts, together with animations!).

XeTeX (or rather its PDF driver, xdvipdfmx) does not know what to do with those glyphs and font tables, and it is not even clear yet what it should do: just keep the tables in the font when it embeds it in the PDF and let the PDF viewer handle the rendering, or interpret the table and extract the bitmaps and embed them directly in the PDF (in case of Apple and Google tables) / apply the glyph layer and their colours and embed them as individual colored glyphs (in case of Microsoft tables) / interpret the SVG and embed it as PDF graphic (in case of Mozilla / Adobe table, not even considering the animations)?

share|improve this answer
    
I think the link [tex.stackexchange.com/a/59125/44227]] is an example. –  Wangyan Li Feb 1 at 2:20

see this page Emoji in LaTeX documents, which may provide a way to work it out, and this one [http://tex.stackexchange.com/a/59125/44227]

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.