Bug 156084

Summary: PRINTING Snowflake UTF symbol (U+2744) isn't printed/exported as PDF
Product: LibreOffice Reporter: mgruber <mgruber_72>
Component: Printing and PDF exportAssignee: ⁨خالد حسني⁩ <khaled>
Status: VERIFIED FIXED    
Severity: normal CC: khaled, miguelangelrv, serval2412
Priority: medium    
Version: 7.6.0.0 beta1+   
Hardware: All   
OS: All   
Whiteboard: target:24.2.0 target:7.6.0.0.beta2
Crash report or crash signature: Regression By:
Attachments: Snowflake symbol != WYSIWYG in prints and as exported PDF file
Pdf sample
ODT of the problem
Exported PDF lacking the snowflake

Description mgruber 2023-06-27 20:55:27 UTC
Created attachment 188114 [details]
Snowflake symbol != WYSIWYG in prints and as exported PDF file

Steps to reproduce:

1. Go to https://www.compart.com/en/unicode/U+2744 and copy the red snowflake symbol in the clipboard
2. Paste it into LibreOffice Writer -> a shaded blue snowflake appears
3. Try to print or export it as PDF
4. Printed document and the PDF lacks the blue snowflake

Attached you can find a screenshot how it looks in writer.
Prints or PDF exports don't show the blue snowflake.
Comment 1 m_a_riosv 2023-06-27 23:24:12 UTC
Created attachment 188115 [details]
Pdf sample

i can't reproduce the issue.
Comment 2 Julien Nabet 2023-06-28 08:14:35 UTC
On pc Debian x86-64 with master sources updated today, I could reproduce this.
(gtk3 and gen renderings)

There's no specific console log.
Comment 3 mgruber 2023-06-28 09:08:36 UTC
I'll attach the ODT and an exported PDF of it.

I used Firefox to copy into the clipboard an im on XFCE as desktop environment - not sure if that makes a difference.
Comment 4 mgruber 2023-06-28 09:09:26 UTC
Created attachment 188117 [details]
ODT of the problem
Comment 5 mgruber 2023-06-28 09:10:08 UTC
Created attachment 188118 [details]
Exported PDF lacking the snowflake
Comment 6 Commit Notification 2023-06-30 07:51:10 UTC
Khaled Hosny committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/6c51710969003c0b97e4739d515fe5734798b92d

tdf#156084: Fix PDF export of bitmap color fonts

It will be available in 24.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 7 ⁨خالد حسني⁩ 2023-06-30 07:55:19 UTC
This is a duplicate of Bug 121327 which is already fixed in 7.5.x.

(In reply to Julien Nabet from comment #2)
> On pc Debian x86-64 with master sources updated today, I could reproduce
> this.
> (gtk3 and gen renderings)
> 
> There's no specific console log.

This a regression in master/7.6, thanks for catching it. It is fixed now.
Comment 8 mgruber 2023-06-30 08:02:35 UTC
Will this also fix the printing or just the PDF export?
Comment 9 ⁨خالد حسني⁩ 2023-06-30 08:20:42 UTC
Printing in Linux typically uses PDF so it should work. It will not work when using PostScript for printing.
Comment 10 Julien Nabet 2023-06-30 09:12:18 UTC
On pc Debian x86-64 with master sources updated today (ce391e52fbb759997f7e2c225513cc074a0f3974) + brand new LO profile, I've got now the snowflake when exporting in pdf but it's black. Shouldn't it be blue (like in Writer) ?
Comment 11 ⁨خالد حسني⁩ 2023-06-30 09:20:11 UTC
(In reply to Julien Nabet from comment #10)
> On pc Debian x86-64 with master sources updated today
> (ce391e52fbb759997f7e2c225513cc074a0f3974) + brand new LO profile, I've got
> now the snowflake when exporting in pdf but it's black. Shouldn't it be blue
> (like in Writer) ?

If you are using evince, it is a bug in Cairo: https://gitlab.freedesktop.org/poppler/poppler/-/issues/842
Comment 12 Julien Nabet 2023-06-30 09:59:48 UTC
(In reply to ⁨خالد حسني⁩ from comment #11)
> (In reply to Julien Nabet from comment #10)
> > On pc Debian x86-64 with master sources updated today
> > (ce391e52fbb759997f7e2c225513cc074a0f3974) + brand new LO profile, I've got
> > now the snowflake when exporting in pdf but it's black. Shouldn't it be blue
> > (like in Writer) ?
> 
> If you are using evince, it is a bug in Cairo:
> https://gitlab.freedesktop.org/poppler/poppler/-/issues/842

Indeed! With Firefox, the snowflake has the right color!
Thank you Khaled!
Comment 13 Commit Notification 2023-07-01 06:40:38 UTC
Khaled Hosny committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

https://git.libreoffice.org/core/commit/8cc9af311e480837e0b20b7fc240c975543ff46d

tdf#156084: Fix PDF export of bitmap color fonts

It will be available in 7.6.0.0.beta2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.