Bug 114042 - Centring of text in Calc not very good.
Summary: Centring of text in Calc not very good.
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.4.3.2 release
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-25 13:16 UTC by Simon Warner
Modified: 2017-11-25 16:03 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
comparison of a mono space font and proportional fonts in centered columns (164.39 KB, image/png)
2017-11-25 16:03 UTC, V Stuart Foote
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Warner 2017-11-25 13:16:49 UTC
Description:
Example:
Different cells with "blue" and "black" (no quotes) the e and k are closer than the two bs. That is centred horizontally with no spaces.  

With many other words, the right margin appears greater than the left.


Steps to Reproduce:
1.Type a word. 
2.Type a word in the cell below. 
3.Select column. 
4.Centre horizontally.

Actual Results:  
The words are not centred around the midline of the cell.

Expected Results:
Centred.


Reproducible: Always


User Profile Reset: No



Additional Info:


User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36
Comment 1 Xavier Van Wijmeersch 2017-11-25 15:02:39 UTC
It does the same in writer, so for its not a bug
Comment 2 V Stuart Foote 2017-11-25 16:02:31 UTC
Can not reproduce on Windows 10 Home 64-bit en-US (ver 1709) with
Version: 5.4.3.1 (x64)
Build ID: 32c8895c6cae21571f364dbb059f419a743ee44d
CPU threads: 4; OS: Windows 6.19; UI render: GL; 
Locale: en-US (en_US); Calc: group


It would be a mistake to expect using a proportional font to maintain offset from center line of column. To have centered results you must select a monospaced font, e.g. Liberation Mono. 

The center line of each column is correctly calculated. Even or Odd length strings will start at or split on the center line respectively. Space before and space after are equal with mono spaced fonts.

Calculating positioning of a true center for each string of text would be inefficient and is simply not needed for layout in a spread sheet.

The attached annotated clip compares centered column with Liberation Mono (13pt) and Liberation Sans (13pt) text strings.
Comment 3 V Stuart Foote 2017-11-25 16:03:52 UTC
Created attachment 137980 [details]
comparison of a mono space font and proportional fonts in centered columns