mate-desktop / atril

A document viewer for MATE
http://www.mate-desktop.org
GNU General Public License v2.0
203 stars 62 forks source link

font substitution not working - is there no fontconfig support? #549

Open dark-penguin opened 2 years ago

dark-penguin commented 2 years ago

Without mscorefonts installed, some PDF files show up with wrong symbols, despite fonts-liberation being installed, and font substitution working in any other applications (LibreOffice Draw properly substitutes Liberation Serif instead).

I know that the common solution to this problem is to install mscorefonts, but shouldn't atril work without non-free fonts when we have a good enough replacement?

Or is it just that atril does not have fontconfig support, and so there are probably no plans to add it?

Expected behaviour

When atril encounters "Times New Roman", it uses "Liberation Serif" instead, as per fontconfig settings:

$ fc-match "Times New Roman"
LiberationSerif-Regular.ttf: "Liberation Serif" "Regular"

Actual behaviour

When atril encounters "Times New Roman", it shows wrong symbols instead, making the document unreadable.

Steps to reproduce the behaviour

I can't send any examples I have because those are all work-related files, I couldn't find any example files on the Internet, and I couldn't create a PDF in LibreOffice without embedding fonts in it. But the problems shows up when you open a PDF with Times New Roman font, and the font is not embedded into the document.

MATE general version

1.24.1-2

Package version

1.24.0-1

Linux Distribution

Debian 11 Bullseye

Link to bugreport of your Distribution (requirement)

It does not make much sense to open a bug report in Debian Stable (especially with the nontrivial bug tracking system) for an issue that is not distro-specific and most likely is just about missing fontconfig support, but if it really is necessary, then I can open one.

I've also made sure this issue exists in Kubuntu 21.04, and Okular (Plasma's default PDF viewer) does not substitute fonts properly either. But LibreOffice Draw still did. Maybe there is a reason why PDF viewers should not substitute fonts?..