| Summary: | Dark background color ignores fix font color | ||
|---|---|---|---|
| Product: | LibreOffice | Reporter: | zaakari |
| Component: | UI | Assignee: | Not Assigned <libreoffice-bugs> |
| Status: | NEW --- | ||
| Severity: | normal | CC: | aacid, buzea.bogdan, heiko.tietze, m.weghorn, pfatula, quikee, raal, stephane.guillou |
| Priority: | medium | Keywords: | bibisected, bisected |
| Version: | 24.2.0.3 release | ||
| Hardware: | All | ||
| OS: | All | ||
| See Also: | https://bugs.documentfoundation.org/show_bug.cgi?id=161595 | ||
| Whiteboard: | |||
| Crash report or crash signature: | Regression By: | ||
| Bug Depends on: | |||
| Bug Blocks: | 157844 | ||
| Attachments: | Font effect Outline | ||
|
Description
zaakari
2024-02-03 14:55:07 UTC
I also tried resetting my profile, but it made no difference. Confirm in Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: b39c6082aa975ed8e5696c3dc24c3025ed07bbb6 CPU threads: 4; OS: Linux 6.5; UI render: default; VCL: gtk3 Locale: cs-CZ (cs_CZ.UTF-8); UI: en-US Calc: threaded Jumbo Works in Version: 7.3.7.2 / LibreOffice Community Build ID: 30(Build:2) CPU threads: 4; OS: Linux 6.5; UI render: default; VCL: gtk3 Locale: cs-CZ (cs_CZ.UTF-8); UI: cs-CZ Ubuntu package version: 1:7.3.7-0ubuntu0.22.04.4 Calc: threaded Setting black background and red font doesn't works. Font is white. But for instance setting black background and lime color for font works. This seems to have begun at the below commit in bibisect repository/OS linux-64-24.2. Adding Cc: to Heiko Tietze ; Could you possibly take a look at this one? Thanks c360bb4042d85a453b2cf898bf815aafb6afd4ad is the first bad commit commit c360bb4042d85a453b2cf898bf815aafb6afd4ad Author: Jenkins Build User <tdf@pollux.tdf> Date: Sat Jul 15 09:22:37 2023 +0200 source ddb483509113e469b771320fea52f1b089574021 154352: Resolves tdf#156182 - Automatic text color unreadable with darker cells | https://gerrit.libreoffice.org/c/core/+/154352 The default font color is automatic and depend on the background. The mentioned patch changed the calculation when the color is considered to be dark, an improvement for accessibility. You can change the font color in the same dialog or you define it on the paragraph/character style level. Is there any issue beyond the observation that something has changed? Yes, I understand that the automatic font colour adjusts itself based on the background colour--that is definitely a good thing. But I am referring to non-automatic colours getting changed: if you put the background to a dark colour, then change the theme's font colour to a dark or semi-dark colour (non-automatic), then it just gets switched to white anyway (even if you chose blue or red, etc.). Not only is this strange (given that a non-automatic colour whas chosen), it is also inconsistent with how light colours are handled, as one can set the themed font and background colour both to "Light Gray 2" (or higher) and then the text cannot be seen. This however, makes sense to me as the user specifically chose both colours (if he doesn't want the text to be visible, so be it). But if you just see this as a preference issue, then I can live with changing the font colour at the character level--I just liked to be able to view the document in a different theme without modifying its content (that, and I don't understand why a non-automatic colour is being modified). The actual patch is https://gerrit.libreoffice.org/c/core/+/158024 (the mentioned was reverted). It changed the calculation when a color is treated as dark moving the threshold from black or very dark towards the middle values. The issue with the font color has always been there and is also present in Calc: if the background is treated as dark and the font color is dark it becomes white, and vice versa, ignoring whether the font color is defined as automatic or a fix value. For example sc/source/core/data/patattr.cxx ScPatternAttr::fillColor() We have two functions, IsDark() and IsBright() with thresholds of <=156 (62 before) and >=245. Meaning below a contrast of about 60% (25% before) or above 95% we use the defined font color. Tomaz, you made some changes for the mentioned Calc method in https://gerrit.libreoffice.org/c/core/+/154061. Please advise how to proceed. (In reply to Heiko Tietze from comment #9) > Tomaz, you made some changes for the mentioned Calc method in > https://gerrit.libreoffice.org/c/core/+/154061. Please advise how to proceed. I didn't look into this issue - yet. My change here was mostly refactoring as we called one GetFont method, which does 2 things - prepares the font and color. But in some cases we only cared about the font and in other cases only about the font color. When we were only interested about the font we called GetFont with SC_AUTOCOL_BLACK (which always changed AUTO to black). I changed this to 2 methods fillFontOnly and fillColor (and fillFont that does both) and then call fillFontOnly() when we were not interested in the color. Maybe I did a mistake at refactoring? It is possible... *** Bug 159582 has been marked as a duplicate of this bug. *** *** Bug 159628 has been marked as a duplicate of this bug. *** Created attachment 192641 [details]
Font effect Outline
Another problem with the commit is Font effect - outline. See testcase and printscreen from 7.6 and 24.2
(In reply to raal from comment #13) > Created attachment 192641 [details] > Another problem with the commit is Font effect - outline. See testcase and > printscreen from 7.6 and 24.2 I can confirm this started at ddb483509113e469b771320fea52f1b089574021 (and was not good either at f07d47fff571c4446988715f3c21362b9eed4265~1) I'd suggest to focus on this issue here, as the problem of fixed dark font not respected for dark background is an issue inherited from OOo. (Bug 161595) Heiko, what do you think of that issue with font - outline? (In reply to raal from comment #13) > Another problem... => bug 161863 The color defined as Automatic in tools > options > app colors is used for bright backgrounds, for example if your spreadsheet has a white cell background. It turns into white if the cell background becomes darker, mid grey, red, green, etc. The question is, what could be the opposite of a random color, or should we really use it unconditionally? |