Bug 167849 - Loading several documents with different embedded fonts drops embedded fonts from earlier-loaded document on Windows
Summary: Loading several documents with different embedded fonts drops embedded fonts ...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All Windows (All)
: medium normal
Assignee: Mike Kaganski
URL:
Whiteboard: target:26.2.0 target:25.8.1
Keywords:
Depends on:
Blocks:
 
Reported: 2025-08-07 13:28 UTC by Mike Kaganski
Modified: 2025-08-14 07:49 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
Document 1 with embedded font (28.07 KB, application/vnd.oasis.opendocument.text)
2025-08-07 13:28 UTC, Mike Kaganski
Details
Document 2 with embedded font (12.64 KB, application/vnd.oasis.opendocument.text)
2025-08-07 13:28 UTC, Mike Kaganski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kaganski 2025-08-07 13:28:18 UTC
Created attachment 202228 [details]
Document 1 with embedded font

Run the command to load both attachments:

soffice path/to/embed-unrestricted1.odt path/to/embed-unrestricted2.odt

Both files open, but the first doesn't show the embedded font. Loading it separately will show the font correctly.

Interesting, that loading the documents one by one in the same session sometimes don't show the problem on release builds. However, it is always reproducible in current master's debug builds.
Comment 1 Mike Kaganski 2025-08-07 13:28:30 UTC
Created attachment 202229 [details]
Document 2 with embedded font
Comment 2 Mike Kaganski 2025-08-07 14:03:10 UTC
https://gerrit.libreoffice.org/c/core/+/189100
Comment 3 Commit Notification 2025-08-07 18:27:23 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/87ef004115d07c16fe4899b3d423cc16a12a0fce

tdf#167849: don't release embedded fonts in WinSalGraphics::ClearDevFontCache

It will be available in 26.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 4 Commit Notification 2025-08-08 15:05:07 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/e9bdc5e28993c12dfcdd8837e5fabd89f114dcd3

tdf#167849: unit test

It will be available in 26.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 5 Commit Notification 2025-08-13 18:12:23 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-25-8":

https://git.libreoffice.org/core/commit/6f6c4408bb9dd6e9bad72e76f9bb80110a534dfc

tdf#167849: don't release embedded fonts in WinSalGraphics::ClearDevFontCache

It will be available in 25.8.1.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 Commit Notification 2025-08-14 07:49:37 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-25-8":

https://git.libreoffice.org/core/commit/f9914a8403317f84b22894fe972da029d1140614

tdf#167849: unit test

It will be available in 25.8.1.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.