Bug 161046 - No substitute fonts when opening a file without the file's font installed locally
Summary: No substitute fonts when opening a file without the file's font installed loc...
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
24.2.0.3 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-11 23:47 UTC by Jon
Modified: 2024-06-01 03:15 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
test DOCX that uses Aptos (10.39 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2024-05-27 04:31 UTC, Stéphane Guillou (stragu)
Details
Screenshot showing substitution is happening. (41.05 KB, image/png)
2024-05-27 09:57 UTC, m_a_riosv
Details
Original Document (partial) (10.65 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2024-05-28 03:34 UTC, Jon
Details
pdf of test document using the rpm of Libreoffice 24.2.3.2 on Libreoffice's site. (16.26 KB, application/pdf)
2024-05-30 20:24 UTC, Jon
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jon 2024-05-11 23:47:21 UTC
When I open a file which uses a font not installed on my computer, almost all of the letters show up as small rectangles rather than substituting the font (for display) with a locally installed font. This also happens on another computer, using the same OS, but with version 24.2.3.2 installed. Surely this isn't a "feature", right?
Comment 1 m_a_riosv 2024-05-12 17:12:04 UTC
Please take a look at
https://ask.libreoffice.org/t/an-option-like-missing-font-substitution/11053
Comment 2 Jon 2024-05-12 21:59:48 UTC
Thank you for the link. However, the solutions there (of 8 or 9 years ago) don't seem to apply here. Yes, I could use the substitution table, but I'm looking at documents that do not consistently use a certain font. Also, the problem only occurred when moving from 7.6 to 24.2, not when there was a change in OS or as a result of a kernel or other update in Fedora 39. I observed the same behavior on two separate computers, both running Fedora 39, though I updated LibreOffice on them weeks apart from each other.
Comment 3 Jon 2024-05-20 00:32:42 UTC
I have discovered that this problem appears to only occur when installing from the rpm on LibreOffice's site. It did not occur when I installed it from Fedora's respository.
Comment 4 Stéphane Guillou (stragu) 2024-05-27 01:08:00 UTC
Please provide an example file as an example for others to test, and let us know what font it uses, and what you expect it to be substituted by.
Please also share the version details for the Fedora-provided build, and the same for the TDF-provided one.
Comment 5 Jon 2024-05-27 03:13:16 UTC
Sorry, I no longer have either of the files I was using with fonts I didn't have installed when I began using version 24.2. I believe the font used in the last file I looked at was "artos" or "aptos"It does not appear to be unique to any particular file or font, but rather any file that was using a font not installed on my computer.

This happened both in the original version I tested (24.2.0.25?) and in 24.2.3.2. It only happened with Libreoffice installed from the rpm on Libreoffice's site, whereas the problem did not appear when I installed it from Fedora's repository. I originally used the rpm from Libreoffice's site because the Fedora respository installs the individual pieces of Libreoffice, but not the startup screen that gives quick access to all the apps and recent files.
Comment 6 Stéphane Guillou (stragu) 2024-05-27 04:31:24 UTC
Aptos is the new default font for many MS 365 users.
I created a new document in MS 365, it used Aptos by default, then I opened it on Ubuntu 22.04 + GNOME 42.9 with:

Version: 24.8.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: ae798781ef4df7a1fdef13af0bc459bf4f6e7b4c
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

The font was substituted by DejaVuSans (seen in exported PDF), which is supposed to have broad Unicode coverage.
Without a sample file, it will be difficult to figure out what is going on.

Is the version "from Fedora repositories" actually a Flatpak version? Can you paste here the version information from Help > About LibreOffice?
Comment 7 Stéphane Guillou (stragu) 2024-05-27 04:31:55 UTC
Created attachment 194366 [details]
test DOCX that uses Aptos
Comment 8 m_a_riosv 2024-05-27 09:57:35 UTC
Created attachment 194371 [details]
Screenshot showing substitution is happening.

Substitution happens for me with
Version: 24.2.3.2 (X86_64) / LibreOffice Community
Build ID: 433d9c2ded56988e8a90e6b2e771ee4e6a5ab2ba
CPU threads: 16; OS: Windows 10.0 Build 22631; UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US
Calc: CL threaded

'Aptos' is shown in italic because it is not installed, with the same text that I see with Word.
Comment 9 Jon 2024-05-28 03:34:07 UTC
Created attachment 194389 [details]
Original Document (partial)

Okay, I finally managed to find at least the last document I got using Aptos. There was at least one other before this one but I have no memory of what it was or what font it was produced in.

Here's the information from Writer's "about" screen:
Version: 24.2.3.2 (X86_64)
Build ID: 420(Build:2)
CPU threads: 2; OS: Linux 6.8; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

As I wrote previously, this version has no problem in automatically creating a substitute font. It is from Fedora's own repository, not flatpak. I installed it with dnf in the terminal. I'm using Gnome 4.6 Fedora 39 on one computer and Gnome 4.6 on Fedora 40 with the other. Results were the same on both computers.
Comment 10 QA Administrators 2024-05-29 03:15:00 UTC Comment hidden (obsolete)
Comment 11 Stéphane Guillou (stragu) 2024-05-29 04:10:39 UTC
Using your file, I could not reproduce, flatpak or not:

Version: 24.2.3.2 (X86_64) / LibreOffice Community
Build ID: 433d9c2ded56988e8a90e6b2e771ee4e6a5ab2ba
CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Flatpak
Calc: threaded

Please do the following:
- open your file with the buggy version
- export as PDF
- attach the PDF here

Thank you.
Comment 12 Jon 2024-05-30 20:24:27 UTC
Created attachment 194464 [details]
pdf of test document using the rpm of Libreoffice 24.2.3.2 on Libreoffice's site.
Comment 13 QA Administrators 2024-05-31 03:15:29 UTC Comment hidden (obsolete)
Comment 14 Stéphane Guillou (stragu) 2024-05-31 03:50:03 UTC
(In reply to Jon from comment #12)
> Created attachment 194464 [details]
> pdf of test document using the rpm of Libreoffice 24.2.3.2 on Libreoffice's
> site.
pdffonts shows the following for your PDF:

name                    type       encoding    emb sub uni object ID
----------------------- ---------- ----------- --- --- --- ---------
[none]                  Type 3     Custom      yes no  yes     16  0
CAAAAA+OpenSymbol       TrueType   WinAnsi     yes yes yes      9  0
DAAAAA+LiberationMono   TrueType   WinAnsi     yes yes yes     14  0

My own export looks like this:

name                    type       encoding emb sub uni object ID
----------------------- ---------- -------- --- --- --- ---------
BAAAAA+DejaVuSans       TrueType   WinAnsi  yes yes yes     43  0
CAAAAA+OpenSymbol       TrueType   WinAnsi  yes yes yes     38  0
DAAAAA+CourierNewPSMT   TrueType   WinAnsi  yes yes yes     48  0

As you can see, my export substituted Aptos with DejaVuSans, but your export has a missing Type 3

Two questions:
- Do you see DejaVuSans listed in your fonts in LibreOffice? And in your system's font manager?
- What happens if you backup your profile directory and start with a fresh one?

Maybe Khaled has an idea.
Comment 15 Jon 2024-05-31 21:50:19 UTC
Yes, I do have DejaVu Sans available in LibreOffice

I deleted my configuration file and reopened Libreoffice. The test file results were the same as before, i.e., just rectangles in the place of letters, but numbers show okay. It reminds me of trying to open a file with the wrong code page but I obviously have no idea what's going on here.
Comment 16 QA Administrators 2024-06-01 03:15:28 UTC Comment hidden (obsolete)