Bug Hunting Session
Bug 104677 - FILEOPEN DOCX: ww8 uses fallback font when rendering WMF to canvas different at LibO5.0 compared to Lib4.4 and Word
Summary: FILEOPEN DOCX: ww8 uses fallback font when rendering WMF to canvas different ...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
5.0.0.5 release
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:docx
Depends on:
Blocks: Font-Rendering
  Show dependency treegraph
 
Reported: 2016-12-14 12:47 UTC by Telesto
Modified: 2019-10-11 02:37 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file (97.53 KB, application/vnd.openxmlformats-officedocument.wordprocessingml)
2016-12-14 12:47 UTC, Telesto
Details
Comparison different LibO versions and Word (35.98 KB, application/pdf)
2016-12-14 12:48 UTC, Telesto
Details
extracted WMF in ODG (9.74 KB, application/vnd.oasis.opendocument.graphics)
2016-12-14 16:53 UTC, V Stuart Foote
Details
Docx reduced to just the WMF in ODT (22.20 KB, application/vnd.oasis.opendocument.text)
2016-12-14 17:00 UTC, V Stuart Foote
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2016-12-14 12:47:15 UTC
Description:
Spacing between characters is matching. Fonts look crushed. Spacing between equal symbol to width   

Steps to Reproduce:
1.Open attached file

Actual Results:  
Spacing between characters is matching. Fonts look crushed. Spacing between equal symbol to width   

Expected Results:
Should look the same as in LibO4.4.6.3 (and Word)


Reproducible: Always

User Profile Reset: No

Additional Info:
Found in
Version: 5.4.0.0.alpha0+
Build ID: d538d3d84172a74dfe97d59a6d3daf9a45459cab
CPU Threads: 4; OS Version: Windows 6.19; UI Render: default; 
TinderBox: Win-x86@39, Branch:master, Time: 2016-12-14_00:28:59
Locale: nl-NL (nl_NL); Calc: CL

and in
Version: 5.1.0.3
Build ID: 5e3e00a007d9b3b6efb6797a8b8e57b51ab1f737
CPU Threads: 4; OS Version: Windows 6.2; UI Render: default; 
Locale: nl-NL (nl_NL)

but not in
Versie: 4.4.6.3 
Build ID: e8938fd3328e95dcf59dd64e7facd2c7d67c704d
Locale: nl_NL


User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0
Comment 1 Telesto 2016-12-14 12:47:42 UTC
Created attachment 129629 [details]
Example file
Comment 2 Telesto 2016-12-14 12:48:27 UTC
Created attachment 129630 [details]
Comparison different LibO versions and Word
Comment 3 V Stuart Foote 2016-12-14 16:53:37 UTC
Created attachment 129637 [details]
extracted WMF in ODG
Comment 4 V Stuart Foote 2016-12-14 17:00:25 UTC
Created attachment 129639 [details]
Docx reduced to just the WMF in ODT

This is a font handling issue.

The "formula" is a WMF image that is filter imported into Writer canvas with fallback fonts.

Convert the attached to PDF to check the font fall back used in parsing the WMF into Writer canvas.

The ww8 import filter falls back to OpenSymbol and Liberation Serif reading the WMF. While the image import to Draw retains the SymbolMT and TimesNewRomanPSMT

So question might be if the WMF filter for Draw can be used with the ww8 filter for Writer.
Comment 5 V Stuart Foote 2016-12-14 17:20:25 UTC
Happens between 4.4 and 5.1 so suspect it was changes to WinLayout.cxx

Subsequent work on HarfBuzz layout and font handling done for that has improved the font fallback--but using "native" LibreOffice fonts.

Still have different outcomes between filters for import of WMF into Draw (no font fallback) vs opening OOXML into Writer (uses fallback).

So question is where the filter parsing of the WMF diverged.
Comment 6 V Stuart Foote 2016-12-14 17:27:25 UTC
Filter import of the WMF was already muddled at
Version: 5.0.0.2 (x64)
Build ID: a26d58f11b99b6aeddf7f7884effea188cc6e512
Locale: en-US (en_US)
Comment 7 V Stuart Foote 2016-12-14 17:45:15 UTC
And at 5.3.0 we've dropped support for PS Type1 fonts so we now get a different fallback for the embedded Symbol font tat WMF uses.
Comment 8 QA Administrators 2017-12-15 07:45:39 UTC Comment hidden (obsolete)
Comment 9 Buovjaga 2018-05-22 12:34:23 UTC
Note that attachment 129629 [details] has to be used for testing. The minimal example renders the question mark also in older versions.

Bisected to https://cgit.freedesktop.org/libreoffice/core/commit/?id=791d8b4f1f656a8553c25fe9034ca8a350efaaae

commit	791d8b4f1f656a8553c25fe9034ca8a350efaaae (patch)
tree	b4931b8dfc2258e2ce1f30117e3f81b4f565be07
parent	bf33f22ff29b6e4f6ea204e7d438cf28a1079392 (diff)
DOCX import: convert MathType to Math if MathTypeToMath is enabled
With this, math equations created by Word <= 2003 and embedded to docx
files can be edited finally. Previously the result was read-only and
opened in an unexpected new window.

Change-Id: I4f9dd1cca4a149959f6151cf9af9242b53190ef5

Adding Miklos to CC, although this looks like he did not exactly break anything.
Comment 10 Miklos Vajna 2018-05-22 13:18:07 UTC
Yes, that just uncovers an existing bug that was previously hidden as the setting was ignored.
Comment 11 Xisco Faulí 2018-06-05 21:10:53 UTC Comment hidden (obsolete)
Comment 12 Xisco Faulí 2018-06-05 21:11:44 UTC
Adding Cc: to Miklos Vajna
Comment 13 Miklos Vajna 2018-06-22 15:53:21 UTC
(In reply to Miklos Vajna from comment #10)
> Yes, that just uncovers an existing bug that was previously hidden as the
> setting was ignored.

Forgot to update keywords accordingly. The bug itself is of course valid, workaround is to disable the mathtype<->math conversion in the settings, and fixing it will also improve the DOC import.
Comment 14 QA Administrators 2019-10-11 02:37:04 UTC
Dear Telesto,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from http://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://kiwiirc.com/nextclient/irc.freenode.net/#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug