Bug 157240

Summary: PRINTING text lines disappear (in fact become white) when printing in grayscale
Product: LibreOffice Reporter: mmtsuchi <mm.tsuchi>
Component: DrawAssignee: Mike Kaganski <mikekaganski>
Status: RESOLVED FIXED    
Severity: normal CC: buzea.bogdan, caolan.mcnamara, hossein, ilmari.lauhakangas, mm.tsuchi, xiscofauli
Priority: medium Keywords: bibisected, bisected, regression
Version: 7.5.5.2 release   
Hardware: All   
OS: All   
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=152990
https://bugs.documentfoundation.org/show_bug.cgi?id=156182
Whiteboard: target:24.8.0
Crash report or crash signature: Regression By: Caolán McNamara
Bug Depends on:    
Bug Blocks: 142074, 158315    
Attachments: example to show grayscal bug that turn some text to white color
picture to show grayscale printing that turn text white
A simple reproducer for Bug 157240

Description mmtsuchi 2023-09-14 19:04:50 UTC
Created attachment 189576 [details]
example to show grayscal bug that turn some text to white color

Since Libreoffice version between 7.3 and 7.5.5, when you want to **print in grayscale, some text in text frames disappears.**
You can see on preview.
In fact, those texts become white.
Not all text are affected.

Colored and black & white show all text.

Libreoffice 7.3 doesn't show this problem.

Windows and linux versions 7.5.5, 7.5.6, 7.6 show this problem.

Regards
Comment 1 mmtsuchi 2023-09-14 19:09:45 UTC
Created attachment 189577 [details]
picture to show grayscale printing that turn text white
Comment 2 mmtsuchi 2023-09-15 12:37:09 UTC
It seems to be related to 1st line of paragraphs.

When you insert a space character at the begining of paragraph, the bug disappears, the text retrieves its "normal" color when printing in grayscale.
Comment 3 Buovjaga 2023-09-28 10:54:14 UTC
I bibisected the disappearing phenomenon with linux-64-7.5 repo to d5c8b38eab3d3766f403a33e11dffa498655be8f
tdf#152990 set the font after the MapMode is (potentially) set

Originally committed to 7.6 with b008831a5545e5a777d77547ef96b9798d795f30

In 24.2 the automatic text colour in the blue rectangle changed to white and it stays white in the print preview. This changed with ddb483509113e469b771320fea52f1b089574021
Resolves tdf#156182 - Automatic text color unreadable with darker cells
Comment 4 Heiko Tietze 2023-10-16 13:39:03 UTC
Resolved the contrast issues from bug 156182 with https://gerrit.libreoffice.org/c/core/+/158024 (new contrast applies to all colors but Light Blue 2 aka Tango Sky, which is the default for object background). But likely unrelated here.
Comment 5 mmtsuchi 2023-10-16 21:29:13 UTC
But, when I set text color to black (for example), I expected it to be black.
Comment 6 Mike Kaganski 2024-04-25 20:24:41 UTC
Created attachment 193855 [details]
A simple reproducer for Bug 157240

This FODG allows to reproduce easily (at least on Windows), by exporting it to WMF, and opening in a WMF reader like MS Paint. The text (black in the top box, yellow in the bottom box) arrives white.

But the WMF shows as expected, when opened in Draw.
Comment 7 Commit Notification 2024-04-26 03:51:09 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/1112a2bea0cb260fd64360b679c3f0f5c495e16e

tdf#157240: also set font color together with font

It will be available in 24.8.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.