https://bugs.documentfoundation.org/show_bug.cgi?id=164290

            Bug ID: 164290
           Summary: Font rendering got more blurry with LO 24.8 and cairo
                    1.18
           Product: LibreOffice
           Version: 24.8.0.3 release
          Hardware: All
                OS: Linux (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: LibreOffice
          Assignee: [email protected]
          Reporter: [email protected]

Description:



Steps to Reproduce:
When we upgraded from SuSE Linux Enterprise 15 SP5 to SP6 we realized the
(same) version of libreoffice 24.8 showed worse font rendering in SP6 and our
users complained it was more difficult to read texts. We had a service request
with SuSE and they were able to reproduce it. Finally they advised me to open a
bug report upstream because the SuSE support doesn't cover libreoffice at this
level but someone from SuSE might be able to take a look here.

Our findings so far:
When upgrading from SP5 to SP6 the libcairo2 library has changed from 1.16.0 to
1.18.0.

Libreoffice 24.8.0 (and newer, latest version I tried was 25.8.0.0) in
combination with libcairo2 1.18.x (1.18.2 tested also) shows a different font
rendering behavior such that the same letter is not always rendered the same
way. With 1.16.0, every identical letter is rendered the same way (see
old1.png),
but with 1.18.x it changes every one or two letters (new1.png), depending on
the font size.

This causes a more noisy font face and makes texts harder to read at certain
font sizes. It's especially annoying when letters could be rendered without
anti-aliasing but get blurred due to this changing rendering, like in old3.png
vs. new3.png (note: to get the very clear letters of old3.png I use
"Xft.hintstyle: hintfull" in ~/.Xresources and SAL_ALLOW_DEFAULT_HINTING=true).

I've already asked Caolán McNamara on the mailinglist and followed his advise
to check the code part where there is a case distincion on the libcairo
version, but this doesn't influence the problem. 

This might not be a sole problem of libcairo, however, because libreoffice
24.2.7.2 (and lower) shows the "same letter, same rendering" even with libcairo
1.18.x, i.e. it looks like in the "old" screenshots.

I've compared the code in cairotextrender.cxx for 24.2.7.2 and 25.2.0.0 but
couldn't find any difference that might explain that changed behaviour.

As a first test I've fetched the different "tags" of libcairo from github. LO
24.8 has the "same letter, same rendering" up to libcairo2 1.17.2. It starts to
show the "same letter, different rendering" starting with the next tag 1.17.4.
This can easily be tested by just LD_PRELOADing the different libcairo.so
files.

LO 24.2.7.2 shows the "same letter, same rendering" with all versions up to
1.18.2.

So it's not clear if this is a libreoffice or a libcairo problem. Maybe
libcairo 1.17.4 introduced some new features that LO 24.8 is using while 24.2
did not yet?

When SuSE was working at this SR they were able to reproduce the same problem
also with Fedora 41 with LO 24.8.2.1 and libcairo2 1.18.0, so it's not
SuSE-specific.

I've found some other reports of changed/ugly font rendering with libcairo 1.17
which might be the same issue, although I'm not sure if 1.17.2+17+g52a7c79fd-1
mentioned in the last two reports is a pre- or post-release to 1.17.2. 
https://lists.cairographics.org/archives/cairo/2023-September/029500.html
https://bugs.archlinux.org/task/64451
https://gitlab.freedesktop.org/poppler/poppler/-/issues/826

My report of this problem to the libcairo mailing list 4 weeks ago has got no
reaction so far, unfortunately, so I'm not sure if the libcairo devs are
interested in this issue.

I will yet have to figure out how to commits to 1.17.2 one after another so
that I might be able to find the exact commit that changed the behaviour. Maybe
then it's easier to see what LO 24.8 is doing differently than to 24.2 w.r.t.
that commit.


Actual Results:


Expected Results:



Reproducible: Always


User Profile Reset: Yes

Additional Info:
Version: 24.8.0.1 (X86_64) / LibreOffice Community
Build ID: 6fd6cae02baed1e82d14ed2da1f2458092354dab
CPU threads: 8; OS: Linux 6.4; UI render: default; VCL: gtk3
Locale: de-DE (en_US.UTF-8); UI: en-US
Calc: threaded

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to