Bug Hunting Session
Bug 108891 - Increase inter-line spacing for multiline text
Summary: Increase inter-line spacing for multiline text
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.3.0.3 release
Hardware: All All
: high enhancement
Assignee: Not Assigned
URL:
Whiteboard: target:6.0.0 target:5.4.2 target:5.3.7
Keywords: needsDevEval
Depends on:
Blocks: Font-Rendering Cell-Line-Spacing
  Show dependency treegraph
 
Reported: 2017-07-01 21:52 UTC by Thomas Lendo
Modified: 2017-09-22 06:21 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments
Comparison before and after caolán's commit (162.70 KB, image/png)
2017-09-07 09:28 UTC, Xisco Faulí
Details
Before/after comparison (151.06 KB, image/jpeg)
2017-09-07 10:10 UTC, Heiko Tietze
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Lendo 2017-07-01 21:52:21 UTC
As shown in bug 105860 (e.g. png attachment https://bugs.documentfoundation.org/attachment.cgi?id=131016), the line spacing is too small and makes content looks cramped compared to LibO versions older than 5.3 or compared to MSO Excel.

Khaled Hosny's patch shouldn’t be reverted (that idea hijacked my previous bug which was the cause for its closing) but the line spacing should be adapted to make LibO better readable and better looking with multi-line content.

It isn't a bug of fonts itself because it's effecting all fonts in different operating systems I've tested.

As I don't know the code and the current spacing preference I can't go more into detail.

I set component to Calc. Other components like Writer web view seems also effected, see bug 108710. Since I don't know if the same preference is used for different components, I let others change it if possible.

Version: 6.0.0.0.alpha0+
Build ID: cac5c9f6081590b0548d3116bc4cd4a2509ec576
CPU threads: 4; OS: Linux 4.8; UI render: default; VCL: gtk2; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2017-07-01_00:55:04
Locale: de-DE (de_DE.UTF-8); Calc: group
Comment 1 Heiko Tietze 2017-07-01 23:07:49 UTC
Same request has been done on Telegram. -> NEW
Comment 2 V Stuart Foote 2017-07-02 02:56:33 UTC
Does this really make any sense for a Spreadsheet?  Multiline cells within a spread sheet are abnormal and frankly abusive.

As rendered by VCL the text:p lines appear to take a default scale drawn from now commonly read font metrics against 100% of the set point size.

We can already format -> Cells -> Borders: "Spacing to contents", which is set by template. But providing enhancement to set line spacing (vertical multiplier beyond the 100% of font size) for the corner case user abusing a spread sheet with multiline cells is questionable.

The Calc case is weak, but a stronger case can be made for line spacing of table cells in Writer. Which IIUC would be implemented the same way. Just not sure this is much of a requirement in general.
Comment 3 Thomas Lendo 2017-07-02 07:16:28 UTC
Thanks for your insights, Stuart.

Please don't mix this bug with Bug 108555 - "Add line spacing feature to cell properties" which is a request that the user can adjust the line spacing in the UI. This bug is only to have a better default value in the code without any means to change it by the user. Similar to Bug 94464 - "Text Body default line spacing too big" (but in the other direction and for Writer text).

My personal use case are spreadsheets with data in several columns and up to thousands of rows. The columns have a small width so that all fit in A4 landscape pages. This results in data cells with digits and text that have line breaks to show all content at the monitor or at the printed landscape page. For me this is the normal use of a spreadsheet I and many others I know are using the software.
If you have many of that line breaks and much content on every A4 page, with the new line spacing calculation the content looks crowded and not very readable and appealing. But we need appealing visualization so that LibO makes good impression to users so that they are gladly using the software.
By the way, Base is no option due to interoperability issues with Excel users.
Comment 4 Heiko Tietze 2017-07-02 07:58:44 UTC
Stuart, you changed the title from "Implement line spacing" to "Implement adjustable line spacing for multiline text in Calc cells". The 'adjustable' aspect is not what has been requested here, it's only about the default (100% to 110%, or the like). I suggest "New default for inter-line spacing for multiline text in Calc cells". Or am I wrong, Thomas?
Comment 5 Thomas Lendo 2017-07-02 08:24:05 UTC
(In reply to Heiko Tietze from comment #4)
> Stuart, you changed the title from "Implement line spacing" to "Implement
> adjustable line spacing for multiline text in Calc cells". The 'adjustable'
> aspect is not what has been requested here, it's only about the default
> (100% to 110%, or the like). I suggest "New default for inter-line spacing
> for multiline text in Calc cells". Or am I wrong, Thomas?
That's correct, thanks Heiko.
Comment 6 V Stuart Foote 2017-07-02 14:14:52 UTC
(In reply to Thomas Lendo from comment #3)
(In reply to Heiko Tietze from comment #4)

OK. Adjusted to "Increase inter-line spacing for multiline text"

Doing this enhancement would be just for a static multiplier of font metric, or of adding some percentage of the font metric height as white space above/below. 

Unfortunately to add additional white space between multiline text we would add complexity (and degrade performance) done either way. Also using a line height other than 100% of what the individual font metrics provide is that behavior in cells (Calc or Table) then differs from default in all other components.

And, still obliged to describe table-cell content within constraints of ODF.
Comment 7 Thomas Lendo 2017-07-03 08:23:48 UTC
I think it's also good for interoperability with other spreadsheet programs to adjust multiline spacing. Heiko touches the difference with Excel in bug 105860 comment 11.
Comment 8 Claus Reibenstein 2017-07-14 16:48:07 UTC
(In reply to V Stuart Foote from comment #2)

> Does this really make any sense for a Spreadsheet?  Multiline cells within a
> spread sheet are abnormal and frankly abusive.

Sorry, but this is bullshit! I use multiline cells quite often, and I am sure I am not the only one. 

Anyways: LibreOffice Calc offers this feature (and other table calculations do as well), and the default spacing in previous versions was ok. With version 5.3.4.2, the default spacing has been reduced to an unreasonable value and can not be changed by the user. It should be reset to the previous value.
Comment 9 Heiko Tietze 2017-07-14 19:14:16 UTC
Set keyword to needDevEval in order to get code pointers.
Comment 10 V Stuart Foote 2017-09-06 13:19:56 UTC
With Caolán's work on bug 107249 beleive this is resolved fixed. Please recheck with a current master >20170906. Backports to 5.4 and 5.3 in progress.

=-ref-=

http://cgit.freedesktop.org/libreoffice/core/commit/?id=0c8b749e602b6743857a9bc4efb24b6183690311
Comment 11 Xisco Faulí 2017-09-07 09:28:10 UTC
Created attachment 136090 [details]
Comparison before and after caolán's commit
Comment 12 Heiko Tietze 2017-09-07 10:10:03 UTC
Created attachment 136092 [details]
Before/after comparison

Calc multiline height 5.1.6+5.4.1+6.0.0; Tested by @ThomasLendo
Comment 13 OfficeUser 2017-09-07 19:50:09 UTC
Good work! Thanks!
Comment 14 V Stuart Foote 2017-09-21 13:15:40 UTC
*** Bug 112497 has been marked as a duplicate of this bug. ***