Bug 107055 - FILEOPEN: DOCX DOC Font Spacing Issue not fitting from table with "Automatically resize to fit contents"
Summary: FILEOPEN: DOCX DOC Font Spacing Issue not fitting from table with "Automatica...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.4.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:doc, filter:docx
: 137985 (view as bug list)
Depends on:
Blocks: Font-Rendering DOCX
  Show dependency treegraph
 
Reported: 2017-04-10 03:02 UTC by Luke
Modified: 2022-08-22 23:04 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Example of Cut-off text (35.73 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2017-04-10 03:02 UTC, Luke
Details
Example of Cut-off text before and after default kern setting changed (38.60 KB, image/png)
2017-04-10 03:03 UTC, Luke
Details
.doc also cut-off (52.50 KB, application/msword)
2017-04-10 03:05 UTC, Luke
Details
Simple Example to Show Issue with Effect Spacing (11.60 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2019-07-21 16:20 UTC, Luke
Details
attachment 81684 compared (108.32 KB, image/png)
2020-11-05 07:24 UTC, Timur
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Luke 2017-04-10 03:02:35 UTC
Created attachment 132429 [details]
Example of Cut-off text

After https://cgit.freedesktop.org/libreoffice/core/commit/?id=38b0c24fa5cbb4246e03d77ac022dfdc9fdede03

Related: tdf#105454 DOCX import: fix unwanted enabled-by-default kerning

Tight .docx textboxes now have text cut-off. .doc files are affected by a different commit. I'm seeing this behavior with both the Cambria and Calibri fonts under Windows. By manually going Edit Style -> Position -> Checking "Pair kerning", I can restore the cut-off text.
Comment 1 Luke 2017-04-10 03:03:21 UTC
Created attachment 132430 [details]
Example of Cut-off text before and after default kern setting changed
Comment 2 Luke 2017-04-10 03:05:21 UTC
Created attachment 132431 [details]
.doc also cut-off
Comment 3 Xisco Faulí 2017-04-11 12:22:28 UTC Comment hidden (obsolete)
Comment 4 Miklos Vajna 2017-04-14 21:12:28 UTC
Thanks for the report, but I don't think this is a regression, sorry. Open the file in Word, press Ctlr-D to open the Font dialog -> go to the Advanced tab -> Kerning for fonts checkbox is not checked.

If you see a file where kerning in LO is (after the above commit) disabled, but not in MSO, that's a regression.

Enabling kerning is a workaround for your problem as far as I see. I also agree it's a bug that the text is cut off, though.

Given that the DOC and DOCX import code is separate, it may make sense to open two bugreports for the two bug documents.
Comment 5 Luke 2017-04-16 03:41:48 UTC Comment hidden (obsolete)
Comment 6 Luke 2017-04-16 04:42:22 UTC
Miklos or Khaled,
Yes, that makes sense that the kerning issue was hiding this spacing issue. Any idea on how to tease out the cause of this? To see if the fonts are taking up too much space, if the table is too narrow, or if the overlap detection needs to be relaxed a bit?
Comment 7 Miklos Vajna 2017-04-18 13:32:43 UTC
One thing you can do yourself is exporting to PDF using LO and MSO and then compare those PDFs. If the table is too narrow, you'll see that clearly with this technique.
Comment 8 Xisco Faulí 2017-04-27 10:30:19 UTC
attachment 107160 [details] from bug 84536 has also changed after 38b0c24fa5cbb4246e03d77ac022dfdc9fdede03
Comment 9 Xisco Faulí 2017-04-27 11:11:41 UTC
Same problem with attachment 101256 [details] from bug 80155
Comment 10 QA Administrators 2018-07-19 02:42:22 UTC Comment hidden (obsolete)
Comment 11 Luke 2018-07-20 16:01:48 UTC Comment hidden (obsolete)
Comment 12 QA Administrators 2019-07-21 02:47:24 UTC Comment hidden (obsolete)
Comment 13 Luke 2019-07-21 16:20:00 UTC
Created attachment 152893 [details]
Simple Example to Show Issue with Effect Spacing

Steps to reproduce:

1. In Word, create a 1 cell table
2. Type a few words
3. Fit table to contents
4. Change Font Effect to small caps
5. Open in Writer

Reproducible with Version: 6.4.0.0.alpha0+ (x64)
Build ID: 2f2f4767089512c34514896bc37823f9310e9dd4
Comment 14 Luke 2019-07-21 22:14:00 UTC
Per Comment 7, I exported my original bugdoc to to PDF using LO and MSO. The resulting dimensions of the table were identical. The issue is with font spacing not the table being too narrow.
Comment 15 Xisco Faulí 2020-11-04 15:12:43 UTC
*** Bug 137985 has been marked as a duplicate of this bug. ***
Comment 16 Timur 2020-11-04 15:22:18 UTC
Bug 137985 is fileopen of DOCX attachment 81684 [details] from bug 81522.
Same for DOC variant from bug 66119 or bug 115649.
With many examples, I raise to High.
Comment 17 Timur 2020-11-05 07:24:19 UTC
Created attachment 167017 [details]
attachment 81684 [details] compared

attachment 81684 [details] doesn't have kerning in MSO, seen good with kerning in LO. But that's a workaround, not a solution.
Table is too tight for content, same if Resize is turned off, same if font Cambria changed to Liberation in MSO, same with small or regular caps (so bug title not good). 
Seems that LO doesn't read or apply "Automatically resize to fit contents". Table can be manually widened in MSO to be good in LO (not a solution). 

(IMO it's better to keep DOC and DOCX here. Easy to open another if one is resolved.)
Comment 18 Timur 2020-11-05 07:37:46 UTC
Funny (or sad for QA, depends how you look) about this bug is that examples attachment 132429 [details], attachment 107160 [details], attachment 81684 [details] are all Demo-Hayden-Management which has multiple bug reports which are not See Also connected not original attachment name was used. 

attachment 101256 [details] from bug 80155 also has "Automatically resize to fit contents".