Change in font hinting between LibreOffice 7.3 and 7.4 (Linux)

I use full font hinting throughout my Linux desktop environment, because I find it easier to read and more comfortable for my eyes. Everything has been working fine until a recent upgrade from LibreOffice 7.2 to LibreOffice 7.4.

The behavior I see now with LibreOffice 7.4 is that fonts are only partially hinted, in LibreOffice Writer only. Other components, such as LibreOffice Calc, don’t seem to be affected.

By trying several versions of LibreOffice, I narrowed down the problem to whatever changed between LibreOffice 7.3 and LibreOffice 7.4.

The screenshot below shows the new behavior in LibreOffice 7.4 Writer (top) and the old behavior in LibreOffice 7.3 Writer (bottom). I would like to revert to the old behavior.
lo-both

This is the same font (DejaVu Sans, 12pt, zoom 100%) on the exact same Linux system. The only thing that’s different is the LibreOffice version.

To give you the full context, I noticed the difference after upgrading from Fedora 35 to Fedora 37, using the LibreOffice version that is bundled with Fedora. Then I uninstalled the LibreOffice packages from Fedora and installed different versions of LibreOffice on Fedora 37 by downloading binary RPM packages from libreoffice.org. I used the install script to install locally for the current user only. I was able to reproduce the behavior I had seen previously with the Fedora packages.

Try a bug description on Bugzilla.


How to Report Bugs in LibreOffice

Are you 100% sure the font is the same? They look respectively as DejaVu Sans and DejaVu Sans Light. In addition I know of no “font hinting” selectable feature for this font. Have you applied direct formatting? Are the styles exactly the same?

1 Like

I am 100% it is exact the same font. In every test case I just opened a blank document and typed. The only direct formatting I applied was to change the font. I assume the styles are the same, because I did not configure any and just used the default.

I am not sure what you mean by “feature”. If you think of something like “bold” or “italic”, then font hinting doesn’t work like that. Font hinting is a configuration option of the font rendering engine, which on Linux is the FreeType library. True type fonts have embedded instructions that help the rendering engine align the glyphs to the screen pixel grid (well, many of them don’t, but the DejaVu font family does). That is what font hinting is all about.

I know what font hinting is but in the wording of your question it could mean access to user-enabled font “features” you find in the Font tab of paragraph /character styles where there is a Features button to activate them. *DejaVu is such a font.

My machine is a Fedora 37 with KDE desktop and LO 7.4.3.2. I can’t reproduce your mishap. I get two different weight in DejaVu Sans and DejaVu Sans Light. Since you upgraded/updated, check that both variants are installed.

On my end, DejaVu Sans and DejaVu Sans Light are two different fonts that I can select from the font list. I tried both, and while they do have different weight, they both suffer from the same hinting issues. I tried the Features button, but that seems to be something else.

Surprisingly, the preview in both the Font properties window and the Font Features window does not have the same issue, and the font looks exactly as I expect it to. The problem seems to affect only rendering in the document view.

First steps

Have a look at Step 5.

Thanks! It looks like it’s not a Skia issue. This is what I have:

Version: 7.4.0.0.alpha1 / LibreOffice Community
Build ID: b871abad383583f02eb49c7e49aeae01f6941072
CPU threads: 2; OS: Linux 6.0; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

Currently testing on the earliest 7.4 version I could find, because I’m opening a bug report (like you suggested) and it asks for the earliest version where the issue appears.

Sorry, it should have been → Step 7

Yes, that makes more sense :slight_smile:

So, setting SAL_USE_VCLPLUGIN=gen does fix the font rendering inside the document view, but completely messes up the UI rendering. Which is somewhat expected, because I basically told it not to use GTK3 anymore. By the way, Help → About now shows VCL: x11, which is probably also expected.

In the meantime, I opened Bug 152239. I’ll make sure to add this new information to the bug.

1 Like

I had a look at your bug report. IMHO, an important information is missing: the desktop manager. I assume you’re under GNOME or MATE (inferred from VCL: gtk3), but it would be better to mention it. I already saw problems resulting from discrepancy between VCL and widget library in the desktop (GTK+ vs. Qt). So, to exclude any misunderstanding, it’d be worth to tell explicitly.

I agree, the desktop manager is important, and you are right, I am using MATE. I added a comment to the bug report and mentioned it.