Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Color emoji is not converted from pptx #11096

Open
hiroshisuga opened this issue Dec 30, 2020 · 9 comments
Open

Color emoji is not converted from pptx #11096

hiroshisuga opened this issue Dec 30, 2020 · 9 comments
Assignees

Comments

@hiroshisuga
Copy link
Contributor

hiroshisuga commented Dec 30, 2020

Describe the bug
Color emoji is not correctly converted from a pptx file.

To Reproduce
Steps to reproduce the behavior:

  1. Start a meeting
  2. Upload a pptx presentation with color emojis.
  3. Emojis do not show up

Used pptx file:
emoji.pptx

Expected behavior
Emojis show up.

Actual behavior
White rectangles (tofu) or monochrome emojis appear.

Screenshots
名称未設定 1

Additional context
Installing fonts-noto-color-emoji according to #11089 did not help. Likely a Libreoffice version problem.

@stale
Copy link

stale bot commented Sep 26, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the status: stale label Sep 26, 2021
@stale stale bot closed this as completed Dec 25, 2021
@hiroshisuga
Copy link
Contributor Author

This problem still persists on test24 server.

1 0

@antobinary
Copy link
Member

Hi @hiroshisuga
Is this a font issue? Does it get resolved for you if you follow https://docs.bigbluebutton.org/admin/customize.html#add-custom-fonts-for-presentation-conversion or
Possibly related to #13319 ?

@antobinary antobinary reopened this Jan 31, 2022
@stale stale bot removed the status: stale label Jan 31, 2022
@hiroshisuga
Copy link
Contributor Author

@antobinary , I will try to look more. I posted it quite a long time ago...

@gustavotrott
Copy link
Collaborator

Hello, it seems to be a known Libreoffice problem https://bugs.documentfoundation.org/show_bug.cgi?id=129523
I can reproduce a similar behavior, although for me the Emoijis are being removed instead of replaced by that wrong chars.

Using Libreoffice Desktop (on Ubuntu) I exported to PDF:
image

Result:
image

And in BBB I have the same result:
image

@gustavotrott
Copy link
Collaborator

It is also visible when exporting Shared Notes or moving it to Whiteboard:

image

@gustavotrott
Copy link
Collaborator

gustavotrott commented Sep 29, 2022

Libreoffice will not release a fix next days..
As a workaround, not perfect, but better than before:

We can remove the font fonts-noto-color-emoji that comes with Debian, and install this one as replacement https://github.com/adobe-fonts/noto-emoji-svg

sudo apt remove fonts-noto-color-emoji

wget https://github.com/adobe-fonts/noto-emoji-svg/releases/download/2.100/NotoColorEmoji-SVG.otf
wget https://github.com/adobe-fonts/noto-emoji-svg/releases/download/2.100/NotoEmoji.otf

sudo mv NotoColorEmoji-SVG.otf /usr/share/fonts/
sudo mv NotoEmoji.otf /usr/share/fonts/

fc-cache -v

Results after that:
image

emoji.pptx:
image

@gustavotrott gustavotrott self-assigned this Sep 29, 2022
@gustavotrott
Copy link
Collaborator

Currently BBB is using LibreOffice 7.3.7.2 30(Build:2) (Alpine 3.17.2).
I did a test using LibreOffice 7.5.1.1 50(Build:1) (Alpine 3.18_alpha20230208).
It seems to be a little better but doesn't solve the problem yet.

emoji.pptx:
image

adobe-fonts/noto-emoji-svg is still the best strategy to mitigate the issue so far.

@gustavotrott
Copy link
Collaborator

Further testing has revealed specifics about the issue at hand. The problem arises during the process of converting a PDF to a PNG image.

Here's a breakdown of the issue:

  1. Generation of PDF with LibreOffice: The initial PDF is created using LibreOffice, where emojis are correctly displayed in color.

    PDF with colored emojis

  2. Conversion of PDF to PNG with pdftocairo: The problem occurs when the pdftocairo tool is used to convert the PDF into a PNG image. The command used is as follows:

pdftocairo -r 300 -png -singlefile -scale-to-x 2048 -scale-to-y -1 -q -f 1 -l 1 /tmp/test.pdf /tmp/testc

This command results in emojis being rendered in grayscale, not in color.

PNG with grayscale emojis

  1. Testing Conversion with pdftoppm: To isolate the issue, the same PDF file was converted using pdftoppm using the following command:

pdftoppm -png /tmp/test.pdf /tmp/testp.png

The pdftoppm tool successfully preserved the color of the emojis, confirming that the issue lies specifically with pdftocairo.

PNG with colored emojis

This detailed analysis indicates that the color loss issue during the conversion process is linked specifically to the use of pdftocairo. Alternative tools like pdftoppm do not exhibit this problem, suggesting an inherent issue with pdftocairo's rendering.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants