Bug 167270 - Number of embedded fonts doubles when saving to DOCX (increases filesize)
Summary: Number of embedded fonts doubles when saving to DOCX (increases filesize)
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.4.7.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:docx
Depends on:
Blocks: Fonts-Embedded
  Show dependency treegraph
 
Reported: 2025-06-27 11:56 UTC by Telesto
Modified: 2025-08-12 04:49 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2025-06-27 11:56:26 UTC
Description:
Number of embedded fonts doubles when saving to DOCX (increases filesize)

Steps to Reproduce:
1. Open the attached file (15 embedded fonts)
2. Save as DOCX
3. Rename DOCX to zip and inspect the font folder: 33 fonts

Actual Results:
33 fonts

Expected Results:
15 fonts in ODT, so 15?


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 26.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 6faa7e6f7bae3e6a613b4f4b7cee4a9c6d2b7aae
CPU threads: 4; OS: Windows 10 X86_64 (build 19045); UI render: default; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL threaded
Comment 1 Telesto 2025-06-27 19:12:27 UTC
Also in
Versie: 4.4.7.2 
Build ID: f3153a8b245191196a4b6b9abd1d0da16eead600
Locale: nl_NL
Comment 2 Mike Kaganski 2025-08-08 11:53:09 UTC
The attached file was missing.
Comment 3 Telesto 2025-08-08 17:47:53 UTC
1. Open attachment 201351 [details]
2. File -> Properties -> Font Tab -> Check Embed fonts & Only embed fonts that are used
3. Save as DOCX (12,3 MB)
4. Save as ODT (+/- 7 MB
Comment 4 Mike Kaganski 2025-08-11 02:22:46 UTC
Right, it seems that we need to check which is correct. Either we export unnecessary fonts in DOCX export; or we omit necessary fonts in ODF export.
Comment 5 Telesto 2025-08-11 19:48:39 UTC
I'm starting to doubt if really something wrong here, or that this simply being the way how MSO embeds fonts. I simply compared ODT with DOCX and was surprised about the size difference
Comment 6 Mike Kaganski 2025-08-12 04:49:21 UTC
The font set inside the packages is different. As said, it needs investigation, which one is correct. In both cases, it's LibreOffice which scans document, and decides which fonts to include. It *might* be possible, that DOCX specifics result in some fonts being used, that aren't in ODF - but I find it unlikely: the code that decides which fonts to embed must scan the model (which is the same in both cases), not the export artifacts.