Bug 94655 - Apple Color Emoji not Visible in Exported PDF
Summary: Apple Color Emoji not Visible in Exported PDF
Status: RESOLVED DUPLICATE of bug 121327
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
Version:
(earliest affected)
4.4.5.1 rc
Hardware: Other All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:pdf
Depends on:
Blocks: PDF-Export
  Show dependency treegraph
 
Reported: 2015-09-30 22:06 UTC by Iandol
Modified: 2022-08-12 17:29 UTC (History)
11 users (show)

See Also:
Crash report or crash signature:


Attachments
test document (10.19 KB, application/vnd.oasis.opendocument.text)
2015-09-30 22:06 UTC, Iandol
Details
Example PDF with no emoji shown (13.75 KB, application/pdf)
2015-10-04 20:09 UTC, Iandol
Details
sample document using EmojiOne color, Apple Color Emoji and Symbola fonts (32.71 KB, application/vnd.oasis.opendocument.text-flat-xml)
2017-11-23 00:31 UTC, V Stuart Foote
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Iandol 2015-09-30 22:06:23 UTC
Created attachment 119151 [details]
test document

Not sure if this is OS X specific but if I put emoji into a document, they are not visible when that document is exported to a PDF. The same document works as expected in Word 2016.

The emoji.odt contains: ✉️ My address  | 📞  +44 111 111111 1111  |  ⌨  mymail@mail.com
Comment 1 Buovjaga 2015-10-02 16:26:28 UTC
The only emoji I don't see in either the odt or pdf is the phone. Others are ok. But I guess you meant none should appear..

Win 7 Pro 64-bit, Version: 5.0.2.2 (x64)
Build ID: 37b43f919e4de5eeaca9b9755ed688758a8251fe
Locale: fi-FI (fi_FI)

Version: 5.1.0.0.alpha1+
Build ID: 25de5cfa43b2b1cb7d7214470acc7719839e13fe
TinderBox: Win-x86@62-merge-TDF, Branch:MASTER, Time: 2015-10-01_08:49:54
Locale: en-US (fi_FI)
Comment 2 raal 2015-10-02 16:55:03 UTC
I can not confirm with Version: 5.1.0.0.alpha1+
Build ID: 83ef294dddf3b1ab5cd5f91a792a7d9413a08f1f
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2015-09-20_07:00:46
Comment 3 tommy27 2015-10-03 06:29:10 UTC
tested under Win8.1 x644

.odt opened with 4.4.5.1 shows all 3 emojis but the in the .pdf export the phone emoji is not displayed and empty rectangles are shown in place of it

.odt opened in 5.1.0.0 alpha shows no phone emoji and the .pdf export shows no placeholder

the other emojis (envelop and keyboard) are correclty displayed and exported in both versions

according to other users comment there's an emoji PDF export problem in 4.4.x whole there's an emoji display problem in 5.0.x and 5.1.x
Comment 4 tommy27 2015-10-03 06:49:41 UTC
let's keep the current bug report for the PDF export issue.

I created Bug 94721 for the ODT display bug, please taka a look at it to confirm
Comment 5 Iandol 2015-10-04 20:09:41 UTC
Created attachment 119279 [details]
Example PDF with no emoji shown

Beluga: sorry to clarify, for me NO emoji appear in the PDF in LibreOffice 5.0.2 or 5.1alpha, I expect all to show as they do in the ODT on OS X and as Word exports — the attached PDF is made with:

Version: 5.1.0.0.alpha1+
Build ID: e3f8eb8d3a594e3b8afa51c214f6c5c44d8dde4e
TinderBox: MacOSX-x86_64@49-TDF, Branch:master, Time: 2015-10-04_07:07:55
Locale: en-US (en.UTF-8)
Comment 6 Alex Thurgood 2015-11-16 11:02:53 UTC
*** Bug 95822 has been marked as a duplicate of this bug. ***
Comment 7 axet 2015-11-17 13:49:03 UTC
Also 👍 - is not visible under linux.

http://graphemica.com/%F0%9F%91%8D
Comment 8 Iandol 2015-12-28 21:41:16 UTC Comment hidden (obsolete)
Comment 9 Iandol 2016-01-09 13:26:25 UTC Comment hidden (obsolete)
Comment 10 Buovjaga 2016-01-09 13:30:20 UTC
(In reply to Iandol from comment #9)
> Hi, the latest version 2015.3 of NeoOffice has the following bug fix:
> 
> • When exporting a document to PDF, NeoOffice would not include any
> characters that use the Apple Color Emoji font
> 
> See http://www.neooffice.org/neojava/en/features.php
> 
> This sounds the same as this bug, so I wonder if that bug fix can be ported
> to LO? NeoOffice have a CVS server, not sure if they are willing to upstream
> the fix (I suppose with the GPL they have to)?
> 
> Here is where their source code is:
> http://www.neooffice.org/neojava/en/build.php

Well, at least they have sent their license statement: http://lists.freedesktop.org/archives/libreoffice/2015-October/070432.html
Comment 11 Iandol 2016-01-09 19:54:05 UTC
I've emailed Patrick Luby to ask for a patch...
Comment 12 V Stuart Foote 2016-11-14 16:39:52 UTC
Please retest with a current master with work done on bug 71603, which will be available in 5.3.0

http://cgit.freedesktop.org/libreoffice/core/commit/?id=03bff1b6b953e4b7a54d2fb7bbf366bea7e959d9

http://cgit.freedesktop.org/libreoffice/core/commit/?id=5d39c2013374727b1c8f147b8b99d54402a7ff02

get clean fallback font replacement for the emoji, and export to PDF.
Comment 13 Iandol 2017-01-05 02:29:19 UTC Comment hidden (obsolete)
Comment 14 V Stuart Foote 2017-01-05 02:45:17 UTC Comment hidden (obsolete)
Comment 15 V Stuart Foote 2017-01-05 02:54:17 UTC
(In reply to V Stuart Foote from comment #14)
> (In reply to Iandol from comment #13)
> > This bug (PDF export removes emoji / unicode characters) still persists in
> > 5.3beta1 for macOS at least.
> > 
> 
> Thanks but please check against 5.3.0.1 rc1 from:
> http://dev-builds.libreoffice.org/pre-releases/mac/x86_64/
> 
> or better with a current build of 5.4.0/master from:
> http://dev-builds.libreoffice.org/daily/master/MacOSX-x86_64@49-TDF/

Sorry the 3b800451b1d0c48045de03b5b3c7bbbac87f20d9 is the 5.3.0.1 rc1 build (2016-12-23). 

Still probably should check with current 5.4.0/master build.

Will check on a 10.12.2 OS X box tomorrow.
Comment 16 axet 2017-11-22 09:58:03 UTC
Version: 5.4.1.2 OS X now even worse, it was able to show Unicode Symbols (smiles) while editing. Now Unicode Symbols not working for booth modes: not for export as PDF, not while editing.
Comment 17 tommy27 2017-11-22 12:01:22 UTC Comment hidden (obsolete)
Comment 18 axet 2017-11-22 12:17:18 UTC
osx 5.4.3.2 - no smiles while editing, no slimes on export pdf

ubuntu version 5.1.6.2 - works booth editing / pdf
Comment 19 V Stuart Foote 2017-11-23 00:29:44 UTC
Think there are two issues at play, one is a font fall back issue where missing fonts are not picking up Apple Color Emoji font. But there is a rendering issue with the Apple Color Emoji not rendering with the LO PDF export filter. But they are rendered on print to JPEG, and PNG. 

On macOS 10.13.1 with
Version: 5.4.3.2
Build ID: 92a7159f7e4af62137622921e809f8546db437e5
CPU threads: 8; OS: Mac OS X 10.13.1; UI render: default; 
Locale: en-US (en_US.UTF-8); Calc: group

On this system I have installed Symbola in addition to the EmojiOne Color we deploy.

In the attached sample document Unicode points from the string

u+1f4fa u+1f50c u+2709 u+1f4de u+2328

are each converted to their glyph using the Command+Option+X toggle for a line of EmojiOne Color, Apple Color Emoji, and Symbols

Printing to PS or PDF with the macOS print routine will pick up the Apple Color Emoji in the result. As will export from LibreOffice to PNG or JPEG image.

But, the LibreOffice export to PDF is not rendering the Apple Color Emoji glyphs to the resulting PDF.

The SVG based Apple Color Emoji (it is a TTF collection, but none of my font tools actually read the SVG) are common now on macOS systems, since they'll be frequent fallback selections with our expanded emoji handling the PDF rendering needs help.
Comment 20 V Stuart Foote 2017-11-23 00:31:35 UTC
Created attachment 137931 [details]
sample document using EmojiOne color, Apple Color Emoji and Symbola fonts
Comment 21 ⁨خالد حسني⁩ 2017-11-24 20:29:53 UTC
Apple Color Emoji uses “sbix” table to store colored emoji bitmaps (i.e. it is embedding PNGs inside the font).

Our font subsetting code that we use for embedding fonts inside PDFs is decades old and does not support this table (which is relatively new) and most likely just discards it, so the embedded font will either show no emoji glyphs at all or fallback black and white glyphs (if the font has any).

Even if our subsetter supported this table, there be still an issue in showing these PDFs in environments that do not support this table (old versions of macOS, other platforms, etc.), so we might need to even extract the PNGs and embed them directly on the PDF stream, which is even more complex task.

The subsetter is at vcl/source/fontsubset/, the PDF generation code is in vcl/source/gdi/pdfwriter*.

I hope this gives some pointers if anyone wants to work in this,
Comment 22 Xisco Faulí 2019-11-29 13:28:13 UTC Comment hidden (obsolete)
Comment 23 Alberto Salvia Novella 2019-12-02 21:43:30 UTC
Likely related: Emojis aren't printed:
https://bugs.documentfoundation.org/show_bug.cgi?id=129148
Comment 24 ⁨خالد حسني⁩ 2022-08-12 17:29:45 UTC
Apple Color Emoji uses sbix table, so duplicate of bug 121327.

*** This bug has been marked as a duplicate of bug 121327 ***