Bug 163904 - LibreOffice Writer and Impress stores and reads wrong font weights
Summary: LibreOffice Writer and Impress stores and reads wrong font weights
Status: RESOLVED DUPLICATE of bug 152396
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
7.6.7.2 release
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-11-14 17:25 UTC by Zirneklītis
Modified: 2024-11-16 15:44 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Choosing Medium font weight. (8.67 KB, image/png)
2024-11-14 17:26 UTC, Zirneklītis
Details
Before closing the document. One font with 9 weights. (24.33 KB, image/png)
2024-11-14 17:28 UTC, Zirneklītis
Details
The Medium weight has been lost. (23.96 KB, image/png)
2024-11-14 17:29 UTC, Zirneklītis
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Zirneklītis 2024-11-14 17:25:29 UTC
Description:
Both “LibreOffice Writer” and “LibreOffice Impress” stores wrong font weight values. The saved document containing a font with all acceptable font weights (“Thin” (100); “Ultra Light, Extra Light” (200); “Light” (300); “Regular, Normal” (400); “Medium” (500); “Semi Bold, Demi Bold” (600); “Bold” (700); “Extra Bold, Ultra Bold” (800); “Heavy, Black” (900)) has wrong weight values in the “content.xml” file.

The wrong values are for three font weights:
- “Ultra Light, Extra Light” (200): fo:font-weight="150";
- “Light” (300): fo:font-weight="250";
- “Medium” (500): fo:font-weight="normal".

So there is no surprise that some of the font weight information is lost on reopening the document.

I have tried both the ODP or ODT file to unzip and replace these wrong values with the correct ones in the “content.xml” file. Zipped them and renamed. No luck. The fonts weights are not the same as they should be.

Steps to Reproduce:
1. For writing text, use font which, besides regular weight, has at least Medium font weight.
2. Change some characters to Medium weight.
3. Save, close and open document.

Actual Results:
The Medium font weight is changed to Regular weight.

Expected Results:
The document should look as it was before closing.


Reproducible: Always


User Profile Reset: No

Additional Info:
Not sure on the earliest version affected.
Comment 1 Zirneklītis 2024-11-14 17:26:47 UTC
Created attachment 197619 [details]
Choosing Medium font weight.
Comment 2 Zirneklītis 2024-11-14 17:28:06 UTC
Created attachment 197620 [details]
Before closing the document. One font with 9 weights.
Comment 3 Zirneklītis 2024-11-14 17:29:08 UTC
Created attachment 197621 [details]
The Medium weight has been lost.
Comment 4 V Stuart Foote 2024-11-16 15:44:06 UTC
Look to be on Linux, so dupe to bug 152396

On Windows limited to GDI limits to handling of R/B/I/BI (bug 35538)

*** This bug has been marked as a duplicate of bug 152396 ***