Bug 143133 - LibreOffice leaks embedded Fonts between documents
Summary: LibreOffice leaks embedded Fonts between documents
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
4.1.0.4 release
Hardware: All All
: low minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: implementationError
Depends on:
Blocks: Fonts-Embedded
  Show dependency treegraph
 
Reported: 2021-06-30 12:44 UTC by MM
Modified: 2024-11-10 06:56 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
added example documents - embedded and non_embedded font file (1.95 MB, application/x-zip-compressed)
2021-06-30 13:27 UTC, MM
Details

Note You need to log in before you can comment on or make changes to this bug.
Description MM 2021-06-30 12:44:37 UTC
Description:
I have two documents, one with an embedded font and one with non-embedded font (e.g. Calibri). 
I do not have the font-family Calibri installed on my computer.



Steps to Reproduce:
1. open the document with embedded font (Calibri) and then export as PDF - new PDF document has Calibri als embedded font. - It is OK.
2. Do not close LibreOffice after step 1. Then I open the document with non-embedded fonts (Calibri) and then export as PDF. The new PDF has Calibri as embedded font - It is not OK as Calibri is neither embedded within the document or installed on the machine.

If I close LibreOffice after step 1, it works as expected and the PDF contains Carlito as a fallback font for Calibri.

Actual Results:
See Steps to Reproduce above.

Expected Results:
convert(export as PDF) correct font for embedded and non-embedded fonts file


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.1.4.2 (x64) / LibreOffice Community
Build ID: a529a4fab45b75fefc5b6226684193eb000654f6
CPU threads: 4; OS: Windows 10.0 Build 17763; UI render: Skia/Raster; VCL: win
Locale: de-AT (de_AT); UI: en-US
Calc: threaded
Comment 1 Xisco Faulí 2021-06-30 12:56:59 UTC
Thank you for reporting the bug. Please attach a sample document, as this makes it easier for us to verify the bug. 
I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' once the requested document is provided.
(Please note that the attachment will be public, remove any sensitive information before attaching it. 
See https://wiki.documentfoundation.org/QA/FAQ#How_can_I_eliminate_confidential_data_from_a_sample_document.3F for help on how to do so.)
Comment 2 MM 2021-06-30 13:27:03 UTC
Created attachment 173291 [details]
added example documents - embedded and non_embedded font file
Comment 3 MM 2021-07-01 08:21:52 UTC
The same problem also exists in:
Version: 7.0.6.2 (x64)
Build ID: 144abb84a525d8e30c9dbbefa69cbbf2d8d4ae3b
CPU threads: 4; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win
Locale: en-US (en_AT); UI: en-US
Calc: threaded
Comment 4 Buovjaga 2022-04-29 15:40:35 UTC
I reproduce. You don't have to export as PDF. It is enough to first open the one with embedded and then the one without. You can immediately see from the non-embedded file that the font is not substituted, the font name is not shown in italics in the font toolbar.

I tested with old bibisect repos and noticed that it has been like this since the feature of embedding fonts was introduced in 4.1: https://wiki.documentfoundation.org/ReleaseNotes/4.1#Writer

Arch Linux 64-bit
Version: 7.4.0.0.alpha0+ / LibreOffice Community
Build ID: 3a4a12b3801b0b88d119c6e7aaca1e183f7e470f
CPU threads: 8; OS: Linux 5.17; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded Jumbo
Built on 29 April 2022
Comment 5 ⁨خالد حسني⁩ 2022-10-01 12:10:00 UTC
We register embedded fonts the same way we register bundled fonts. I don’t think we have a way to limit fonts to a single document (I think our font list is global, but don’t quote me on it).
Comment 6 Timur 2022-10-05 12:21:16 UTC
With the previous comment, this is close to WontFix. Xisco, please see.
Comment 7 João Paulo 2023-11-09 22:20:48 UTC
(In reply to Timur from comment #6)
> With the previous comment, this is close to WontFix. Xisco, please see.

Why close it as WontFix if the registered embedded fonts could be unregistered?  When registering embedded fonts, save this info in a list to deregister them after the document with the embedded font is closed.
Comment 8 Chika 2024-11-10 06:56:27 UTC
Hello,

I can reproduce the reported issue in the newer version.

Version: 24.8.2.1 (X86_64) / LibreOffice Community
Build ID: 0f794b6e29741098670a3b95d60478a65d05ef13
CPU threads: 8; OS: macOS 13.6.3; UI render: Skia/Metal; VCL: osx
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

Adding my comment with the latest information

Sincerely,

Chika