Bug 116738 - XLSX import: Different column widths on Linux vs Windows
Summary: XLSX import: Different column widths on Linux vs Windows
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:xlsx
Depends on:
Blocks:
 
Reported: 2018-04-02 05:57 UTC by Mike Kaganski
Modified: 2018-04-02 06:16 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
XLSX which has different column widths when imported on Windows vs Linux (8.91 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2018-04-02 05:57 UTC, Mike Kaganski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kaganski 2018-04-02 05:57:21 UTC
Created attachment 141017 [details]
XLSX which has different column widths when imported on Windows vs Linux

Original report: https://ask.libreoffice.org/en/question/151109

The attachment shows the problem: when imported on Linux (without installed Calibri font), column A has width of 0.81 cm, while on Windows (with Calibri font installed), the column width is 0.65 cm.

The suspicion is that the difference is related to the fact that XLSX stores column width in character width units, and the used font is absent on system (so some other font is possibly used for width calculations). But even if this is the case, this is the bug, since in specific case of Calibri font, we bundle Carlito, which is expected to be metrically compatible, and is used for Calibri substitution; so it should be used for width calculations. Either it is not used here, or the font still has some metrical incompatibility.

Tested on Version: 6.0.3.2 (x64)
Build ID: 8f48d515416608e3a835360314dac7e47fd0b821
CPU threads: 4; OS: Windows 10.0; UI render: GL; 
Locale: ru-RU (ru_RU); Calc: CL

vs

Version: 6.0.2.1
Build ID: 1:6.0.2~rc1-0ubuntu0.16.04.1~lo1
CPU threads: 2; OS: Linux 4.4; UI render: default; VCL: gtk2; 
Locale: en-US (en_US.UTF-8); Calc: group

(the original report was against 5.4.6.2 on Linux Mint v.18)

I mark it as a Linux problem, but actually it looks more like a general problem which happens to manifest itself on Linux for this specific font (I guess it would be the the problem also on Windows if required font was missing).
Comment 1 Mike Kaganski 2018-04-02 06:01:10 UTC
Tested by installing Calibri on the Ubuntu box; the column widths now match the ones on Windows.
Comment 2 Mike Kaganski 2018-04-02 06:16:38 UTC
I found out that I haven't Carlito installed on the Ubuntu box actually. After installing it (and removing the locally installed Calibri), the file imports with correct widths. So closing NOTABUG.