Bug 144784 - UI draws with smaller font size than system default on generic VCL (okay with extra package libreoffice-gtk3)
Summary: UI draws with smaller font size than system default on generic VCL (okay with...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
7.0.4.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: UI
  Show dependency treegraph
 
Reported: 2021-09-29 07:11 UTC by Heiko Tietze
Modified: 2024-06-14 05:09 UTC (History)
10 users (show)

See Also:
Crash report or crash signature:


Attachments
Font-size comparison between LibreOffice and other applications (13.14 KB, image/png)
2021-09-29 16:48 UTC, Charles C
Details
kf5 vs. gen (38.73 KB, image/png)
2023-11-02 08:45 UTC, Heiko Tietze
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Heiko Tietze 2021-09-29 07:11:50 UTC
My setup is 34″ UltraWide with 3440×1440, should be 110 ppi, running KDE and both VCL kf5 and gtk3 show fonts nicely.

Caolan, do you have an idea whether/why dpi affect the UI font?

(In reply to Charles C from bug 101646 comment #70)
> (In reply to Heiko T from comment #67)
> > From what I understand is that you run a special setup where all applications 
> > draw text nicely but LibreOffice not.
> 
> I'm not sure what you mean by special setup; I don't have anything special
> going on here.
> 
> 
> > Mind to file a new bug report with hardware/configuration information?
> 
> Sure.
> 
> Hardware:
> =========
> 
> x86_64 / AMD64 system
> Video card: AMD Baffin [Radeon RX 460/560D / Pro
> 450/455/460/555/555X/560/560X]
> Monitors: 30" 2560x1600, approx 100dpi (had this wrong before)
> 
> Software:
> =========
> Debian 11 / Bullseye
> Desktop: cinnamon 4.8.6-2
> Libreoffice 1.7.0.4-4
> 
> Settings:
> =========
> 
> System/Cinnamon settings regarding this are all defaults (I think).
> 
> Font selection:
>   Default font: Sans Regular 9pt
>   Desktop font: Noto Sans Regular 10pt
>   Document font: Cantarell Regular 11pt
>   Monospace font: Monospace Regular 11pt
>   Window title font: Sans Bold 10pt
> 
>   Text scaling factor: 1.0
> 
> Accessibility:
>   Large text: off
>   Desktop zoom: off
> 
> 
> Those are all the settings I've found that seem related.
> 
> I'm not sure why LibreOffice's menu bar is rendering 30% smaller text than
> every other application.  It is, however, suspiciously close to the ration
> of standard old desktop displays (72dpi) to my displays (100dpi).  Maybe
> it's calculating text size and assuming "less than 200dpi, it's not high-dpi
> so don't scale the text" or something.
Comment 1 Caolán McNamara 2021-09-29 12:02:08 UTC
not off the top of my head, what variant of libreoffice is this, the VCL: field of about, help. If its working in the gtk and kde versions and this was only in gen I'd be inclined to just recommend using one of those instead
Comment 2 V Stuart Foote 2021-09-29 14:27:26 UTC
There was quikee's HiDPI work, I have some recollection we tested screen DPI to classify the UI, and whether to apply scaling. But I think this thread [1] suggests that was cleaned up--is there still internal DPI testing scaling done for HiDPI?

As to what the os/DE do, I know with Widnows os/DE if you don't apply a custom scaling factor and use just default scaling at 100-125% the entire UI is miniscule on 4K displays. And that simple scaling through about 225% is different than using the custom scaling (providing 100-500% range) with Advacned Scaling settings dialog. The simple scaling is more like the Linux UI scaling--1.25, 1.5, 2.0 etc. The Windows custom scaling seems to directly scale the individual UI elements rather than scaling a finished frame. 

I don't really perceive much of a problem on Windows builds and HiDPI / 4K resolution support.  But I know some folks would benefit if we could provide for UI at multiple font sizes despite the users os/DE settings.

=-ref-=
[1] https://listarchives.libreoffice.org/global/design/2016/msg00473.html
Comment 3 Heiko Tietze 2021-09-29 14:38:52 UTC
(In reply to V Stuart Foote from comment #2)
> But I know some folks would benefit if we could provide
> for UI at multiple font sizes despite the users os/DE settings.

Different topic in bug 101646. The UI zoom / variable font sizes should not introduced to work around bugs (neither at all, IMHO).
Comment 4 macias 2021-09-29 14:46:13 UTC
I was affected by this issue as well until Caolán comment (thank you). I installed additional package LibreOffice-gtk3 and after launching LO again this time I got menubar as any other app in the system.

Tested in openSUSE Leap 15.3 running KDE3 (over minimal/generic desktop) and in Tumbleweed running XFCE (over the same initial setup).

So I am not OP, but I am simply reporting, that now it works for me as expected.
Comment 5 Charles C 2021-09-29 16:48:22 UTC
LibreOffice on my system appears to draw the menubar text in a smaller font than any other application does, making it much harder to read.  The menubar text ends up 5px high, while other applications are all 7px.

I used to work around this with the zoom-UI feature, but that's gone, and I understand the reasoning behind that decision.

The 5:7 ratio is suspiciously close to the ratio of old traditional monitors' pixel density vs. my somewhat-higher-density but not modern high-DPI 30" 2560x1600 monitors: 72dpi:100dpi.  I wonder if it's failing to scale the text up because it's lumping them in with the ancient 72dpi standard.

System details and font settings:

Hardware:
=========

x86_64 / AMD64 system
Video card: AMD Baffin [Radeon RX 460/560D / Pro 450/455/460/555/555X/560/560X]
Monitors: 30" 2560x1600, approx 100dpi

Software:
=========
Debian 11 / Bullseye
Desktop: cinnamon 4.8.6-2
LibreOffice 1.7.0.4-4

Settings:
=========

System/Cinnamon settings regarding this are all defaults (I think).

Font selection:
  Default font: Sans Regular 9pt
  Desktop font: Noto Sans Regular 10pt
  Document font: Cantarell Regular 11pt
  Monospace font: Monospace Regular 11pt
  Window title font: Sans Bold 10pt

  Text scaling factor: 1.0

Accessibility:
  Large text: off
  Desktop zoom: off


Those are all the settings I've found that seem related.


An additional complicating factor that contributes to making the menubar hard to read is that it uses black text on a grey background and is low-contrast.  All other applications are black-on-white with my settings.

I will attach an image comparing the menu bars of LibreOffice and various other applications.
Comment 6 Charles C 2021-09-29 16:48:56 UTC
Created attachment 175374 [details]
Font-size comparison between LibreOffice and other applications
Comment 7 Charles C 2021-09-29 16:55:19 UTC
For me, it's VCL: x11.  I guess that may be the issue?  I don't know why the Debian installer didn't default to installing any of the libreoffice-{qt*,gtk*,gnome*,kde*} packages.

I will try installing the additional packages.
Comment 8 Charles C 2021-09-29 16:56:57 UTC
Ah, sorry, libreoffice-gnome is installed, but the others are not.
Comment 9 Charles C 2021-09-29 17:07:33 UTC
With the libreoffice-gtk3 package installed, the contrast problem is gone - the text is black-on-white as with other apps.

However, the menu bar text is now 7px, while other applications appear to respect the "Default font: Sans Regular 9pt" Gnome setting, as their menu bars use 9px text.
Comment 10 V Stuart Foote 2021-09-29 18:12:32 UTC
(In reply to Charles C from comment #9)
> With the libreoffice-gtk3 package installed, the contrast problem is gone -
> the text is black-on-white as with other apps.
> 
> However, the menu bar text is now 7px, while other applications appear to
> respect the "Default font: Sans Regular 9pt" Gnome setting, as their menu
> bars use 9px text.

@Charles, we need to correct you here as you seem unclear.  A font rendered on any screen at 5px or even 7px--pixels-- would be unreadable. Expect you mean points which are ppi independent.

5px or 7px would be even worse if on a HiDPI display with DPI greater than ~165 ppi that effectively shrinks a pixel--"a pixel 1/72" is a pixel at 72 dpi". But even on a legacy resolution 72 dpi screen a 5px font would be pretty much unreadable. Your ~101 dpi display would be worse, but close to the internal LO 100% UI scaling at 96 ppi.

Maybe check with a utility like xruler, kruler, screenruler, etc. (I use MioPlanets Pixel Ruler for Windows) to measure the actual pixel heights of LibreOffice UI fonts--expect they will be above 10px at the ppi of your display with no additional os/DE scaling.
Comment 11 Charles C 2021-09-29 18:37:20 UTC
It was actually rendering at 7px tall, not 7 points - I had already verified that.  So the text was a little under 2mm high.

Now I have installed the libreoffice-gtk3 package (it doesn't replace any other packages, it just gets installed alongside them), and the text is indeed 9px high, so I think it's now respecting the font preferences set.  As I say, I have no idea why this wasn't installed along with the rest of the libreoffice-* packages that get installed by Debian.

I'm not sure what would have made this issue and the fix more discoverable.  Perhaps if libreoffice finds itself running in plain x11 mode when it knows it's running on top of a Gnome/KDE/whatever desktop it could alert the user or something.
Comment 12 Stéphane Guillou (stragu) 2023-11-01 20:16:55 UTC
Heiko, do you still experience this?
Comment 13 Heiko Tietze 2023-11-02 08:45:49 UTC
Created attachment 190605 [details]
kf5 vs. gen

(In reply to Stéphane Guillou (stragu) from comment #12)
> Heiko, do you still experience this?

Yes. VCL=gen with master in background, kf5 with 7.6.2.1 in foreground.
Comment 14 Stéphane Guillou (stragu) 2023-11-02 09:44:50 UTC
Ok, let's mark as New then, given that Charles also reproduced it.