Description: Fonts are rendered poorly when using fractional scaling (e.g. 120% as opposed to integer scaling like 100%, 200%, 300%). Some fonts look worse than Times New Roman, but I used Times New Roman in my screenshots due to its ubiquity. Steps to Reproduce: 1. Set your display scaling to 100%, 200% or 300% and zoom so a document is a fixed size. 2. Set your display scaling to a fractional scaling value like 120%, 125% etc. and zoom so the document appears at the same size on the same display. Actual Results: Fonts look blurry and/or misshappen when fractional scaling is used. Expected Results: Font always looks the same, smooth and crisp, when rendered at the same size on the same display, no matter the Scale factor. Reproducible: Always User Profile Reset: No Additional Info: The issue appears in both GTK and QT, but I have only tested in KDE Plasma (not Gnome for example).
Created attachment 194724 [details] 120% Fractional Scaling Poor Font Rendering Please view at 100% zoom. The screenshot does not actually show exactly how the font rendered, but it is good enough to compare with the other screenshot.
Created attachment 194725 [details] 200% Scaling Good Font Rendering Please view at 100% zoom. The screenshot does not actually show exactly how the font rendered, but it is good enough to compare with the other screenshot.
(In reply to miafr30m from comment #2) > Created attachment 194725 [details] > 200% Scaling Good Font Rendering > > Please view at 100% zoom. > > The screenshot does not actually show exactly how the font rendered, but it > is good enough to compare with the other screenshot. Sorry, I copy and pasted the comment. The 200% scaling screenshot DOES show the font as it was rendered on my screen; it is the 120% scaling screenshot that does not.
Sorry, Something I missed is that you should restart LibreOffice between changing scaling factor
A font where it is very noticeable is Sabon Bold. This font doesn't render too well in the first place but is extra misshapen with fractional scaling. Unfortunately I could not capture this in a screenshot.
tested on Ubuntu 22.04 with Wayland and: Version: 24.2.4.2 (X86_64) / LibreOffice Community Build ID: 51a6219feb6075d9a4c46691dcfe0cd9c4fff3c2 CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: gtk3 Locale: en-AU (en_AU.UTF-8); UI: en-US Calc: CL threaded I can't reproduce - or maybe I can't see the difference. Can you please be more specific about the issue, maybe annotating the screenshots side-by-side? And please share the full version info from Help > About LibreOffice. Thank you!
Unfortunately(In reply to Stéphane Guillou (stragu) from comment #6) > tested on Ubuntu 22.04 with Wayland and: > > Version: 24.2.4.2 (X86_64) / LibreOffice Community > Build ID: 51a6219feb6075d9a4c46691dcfe0cd9c4fff3c2 > CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: gtk3 > Locale: en-AU (en_AU.UTF-8); UI: en-US > Calc: CL threaded > > I can't reproduce - or maybe I can't see the difference. Can you please be > more specific about the issue, maybe annotating the screenshots side-by-side? > > And please share the full version info from Help > About LibreOffice. > > Thank you! I just opened up a document to test again and the rendering has changed. This presumably is due to the KDE Plasma 6.1.1 update. The issue with inaccurate font shapes seems to be gone. However text now looks slightly soft at any fractional scaling level compared to integer scaling. Fonts now look better on my 4K screen which I run at 120% scaling, but worse on my tablet which I run at 195%. Previously when the scaling was close to 200% the font looked both smoother and crisper and more true to shape, but now on both displays it looks true to shape but a little soft. (I still consider this an improvement since being true to shape is more important to me than sharpness) I still stand by my initial hypothesis that the font is being rendered at an integer resolution and then downscaled – it just looks like the downscaling filter has been modified to now include more anti-aliasing.
Created attachment 195071 [details] 120% Plasma 6.1.1 Sabon Bold
Created attachment 195072 [details] 200% Plasma 6.1.1 Sabon Bold
Created attachment 195073 [details] 195% Tablet Plasma 6.1.1
Created attachment 195074 [details] 200% Tablet Plasma 6.1.1
The blurriness is most noticeable in the comparison between 195% and 200% on my tablet.
I can see the difference in sharpness between 195% in attachment 195073 [details] (blurrier) and 200% in attachment 195074 [details] (sharper). I can also see a slight difference with Ubuntu 22.04 + GNOME 42.9 + Wayland, comparing 100% and 175% (the UI only allow .25 increments). Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 5bf58785ba2831de4efc2afe9df463b4a753ccb1 CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: gtk3 Locale: en-AU (en_AU.UTF-8); UI: en-US Calc: CL threaded But the same happens to e.g. the flashing cursor and the margin markers, and your screenshot shows the same issue with the toolbar icons. So isn't this a more general issue? Does it happen with other apps?
Sound a bit like bug 140388; didn't look into the details
(In reply to miafr30m from comment #7) > The issue with inaccurate font shapes seems to be gone. However text now > looks slightly soft at any fractional scaling level compared to integer > scaling. At some point there was an update and fonts once again seems more misshapen than blurry.
(In reply to Stéphane Guillou (stragu) from comment #13) > But the same happens to e.g. the flashing cursor and the margin markers, and > your screenshot shows the same issue with the toolbar icons. So isn't this a > more general issue? Does it happen with other apps? No other apps have this particular issue. Fonts in browsers look perfect no matter the scaling (if they are not perfect it is not noticeable, unlike in LibreOffice where it is very noticeable to me). Graphical applications can display pixel perfect graphics, bypassing system scaling and implementing their own, as long as fractional scaling is set the same on all monitors – there is currently a bug in KDE Plasma that means if Global Scaling is different on different monitors that will break scaling. LibreOffice is also affected by this, except it always renders fonts wrong as long as fractional scaling is used at all, on any monitor. Importantly though, with a single monitor using fractional scaling, fonts will be misshapen. As I said in my previous comment, the misshapen characters are back, and I will upload another comparison example, making sure to only use a single monitor so as not to allow any system bugs to affect the test.
Created attachment 196243 [details] Sabon Bold Scaling Comparison Single Monitor KDE Plasma 6.1.4 Note the inconsistency between each "b" and "n" in all but the 100% scaled version. If you look at the scaled examples from a distance you can see that the darkness of the text oscillates across the line of repeated "b"s and "n"s. This is a clear sign of aliasing of some sort in the way the font is rendered.
(In reply to miafr30m from comment #17) > Created attachment 196243 [details] > Sabon Bold Scaling Comparison Single Monitor KDE Plasma 6.1.4 > > Note the inconsistency between each "b" and "n" in all but the 100% scaled > version. > > If you look at the scaled examples from a distance you can see that the > darkness of the text oscillates across the line of repeated "b"s and "n"s. > This is a clear sign of aliasing of some sort in the way the font is > rendered. To be clear the fonts are also slightly misshapen at 100% and even have a slight oscillation of darkness at 100%, as will always be the case unless the characters were spaced an exact integer of pixels apart. My point is that it looks worse on the scaled examples. Also sorry for how many separate comments I'm adding, I just want to make sure everything is clear.
[Automated Action] NeedInfo-To-Unconfirmed
Created attachment 197311 [details] XWayland Scaling Test There doesn't seem to be an issue when running LibreOffice with XWayland. I couldn't find a way to check if it was pixel perfect the same at different zoom levels, but to me the text looks just as good scaled as it does at 100%, no more misshapen, no more blurry. Looks much better on my screen, finally as good as it used to look on my old standard DPI screen. Still definitely an issue when running in native Wayland mode.
I found a way to immediately check if LibreOffice is rendering pixels 1:1. The cursor thickness will change as you move it if it is being resized, and but it will stay a consistent thickness if it is 1:1. This actually reveals that even integer scaling options (200%, 300% etc.) have issues. It is 1:1 in a Plasma 6.2.2 Wayland session: • When all monitors are at 100% global scaling (either XWayland or Wayland) • When XWayland is used AND all monitors have matching scaling factors In all other situations cursor changes thickness as it moves between characters, and soft or misshapen fonts can be observed: 1. if monitors do not have matching scaling settings – as I said that may be a Plasma (https://bugs.kde.org/show_bug.cgi?id=492432) 2. with any scaling factor other than 100% when running natively in Wayland That second example could be a LibreOffice bug unless I am mistaken. And as I said if other apps do have issues with this it is not noticeable to the same extent for whatever reason.
(In reply to miafr30m from comment #21) > In all other situations cursor changes thickness as it moves between > characters, and soft or misshapen fonts can be observed: > 1. if monitors do not have matching scaling settings – as I said that may be > a Plasma (https://bugs.kde.org/show_bug.cgi?id=492432) > 2. with any scaling factor other than 100% when running natively in Wayland It turns out there are a couple of apps that don't seem have any issues with any scaling settings, including having multiple monitors at different scale factors – Ungoogled Chromium and MPV (both running in Wayland native mode). Presumably there are more. If you open a YouTube video on Chromium, YouTube will correctly identify scaling per monitor and render the video at the correct resolution – moving between monitors with different scale factors will alter the scale factor in the stats for nerds info box. Chromium I think uses GTK, MPV does not have a GUI (but can definitely render pixel perfect video/images). Seems like both 1. and 2. are addressable. Surely we can mark this as confirmed?
*** This bug has been marked as a duplicate of bug 140388 ***