Download it now!
Bug 114437 - Text with Consolas font is cropped on print preview / PDF (unless cell height and width increased)
Summary: Text with Consolas font is cropped on print preview / PDF (unless cell height...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: PDF-Export Print-Preview
  Show dependency treegraph
 
Reported: 2017-12-13 09:58 UTC by Dmitry
Modified: 2019-03-16 20:27 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Initial test scenario (6.54 KB, application/zip)
2017-12-13 09:58 UTC, Dmitry
Details
Text as seen on the screen with red rectangle showing cropped text (10.48 KB, image/png)
2017-12-13 09:59 UTC, Dmitry
Details
Sheet1 on print preview with some text cropped (14.95 KB, image/png)
2017-12-13 09:59 UTC, Dmitry
Details
Sheet2 on print preview with some text cropped and overlapping (9.47 KB, image/png)
2017-12-13 10:00 UTC, Dmitry
Details
PDF export (71.96 KB, application/pdf)
2017-12-13 10:03 UTC, Dmitry
Details
Screen Shot (6.78 KB, image/png)
2018-12-13 12:55 UTC, Ferry Toth
Details
Example of the same problem but opposite (15.09 KB, application/vnd.oasis.opendocument.spreadsheet)
2018-12-20 14:09 UTC, Ferry Toth
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry 2017-12-13 09:58:00 UTC
Created attachment 138411 [details]
Initial test scenario

Test case:
* Create a cell with font "Consolas" and fill-in its content with several lines (10 / 20 in attached test scenario).
* Go to "File" → "Print Preview". Some text in the cell is not visible (cropped).
* Do "File" → "Export as PDF". With similar effect the text is cropped and overlaps with below cell.

Expected: The text is printed as seen on the screen.

This bug seems to be similar to bug #99635.
Comment 1 Dmitry 2017-12-13 09:59:09 UTC
Created attachment 138412 [details]
Text as seen on the screen with red rectangle showing cropped text
Comment 2 Dmitry 2017-12-13 09:59:47 UTC
Created attachment 138413 [details]
Sheet1 on print preview with some text cropped
Comment 3 Dmitry 2017-12-13 10:00:44 UTC
Created attachment 138414 [details]
Sheet2 on print preview with some text cropped and overlapping
Comment 4 Dmitry 2017-12-13 10:03:25 UTC
Created attachment 138415 [details]
PDF export
Comment 5 Buovjaga 2017-12-19 19:24:10 UTC
Repro, more or less, even though the font is substituted as I don't have it.

Arch Linux 64-bit
Version: 6.1.0.0.alpha0+
Build ID: c3764c6848bd5ce0bbea2a82bedc3f0d55f01dce
CPU threads: 8; OS: Linux 4.14; UI render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group threaded
Built on December 19th 2017

Arch Linux 64-bit
LibreOffice 3.3.0 
OOO330m19 (Build:6)
tag libreoffice-3.3.0.4
Comment 6 Chavdar 2017-12-19 20:47:27 UTC
Confirmed
I do not have that font, but the text is cropped and overlaps.

Tested with version:
- 5.4.3.2 (x64)
- 6.0.0.0.beta2 (x64)
Windows 10 64
Locale: bg-BG (bg_BG)
Comment 7 Ferry Toth 2018-12-13 12:55:03 UTC
As a long time user I can say this is a very old bug, and very annoying as it makes the pdf unreadable.

I our case text gets printed on top of outer text. See Screen Shot.

Reason is that text on screen fits in a cell while when printing / creating PDF it doesn't. 

It hurts a bit that no developer is even confirming this issue.
Comment 8 Ferry Toth 2018-12-13 12:55:43 UTC
Created attachment 147498 [details]
Screen Shot
Comment 9 Timur 2018-12-14 17:46:31 UTC
(In reply to Buovjaga from comment #5)
> Repro, more or less, even though the font is substituted as I don't have it.
Please explain. If I substitute Consolas with Liberation or Arial, preview is fine. Which would indicate it's an issue only with this font.

(In reply to Ferry Toth from comment #7)
> I our case text gets printed on top of outer text. See Screen Shot.
Please attach you spreadsheet.
Comment 10 Buovjaga 2018-12-20 11:46:04 UTC
(In reply to Timur from comment #9)
> (In reply to Buovjaga from comment #5)
> > Repro, more or less, even though the font is substituted as I don't have it.
> Please explain. If I substitute Consolas with Liberation or Arial, preview
> is fine. Which would indicate it's an issue only with this font.

I mean the automatic substitution made by LibreOffice. I don't know how to find out what is used as the substitution font.

Now, I don't remember what the situation was in 2017, but now my normal view does NOT match attachment 138412 [details]
My normal view already shows the text "cropped" simply because the row height is too small.
So I'm not sure what to think of this report. Maybe invalid?

Arch Linux 64-bit
Version: 6.3.0.0.alpha0+
Build ID: 146f98e7100ae57ced080c7d9fa028f01df99ca8
CPU threads: 8; OS: Linux 4.19; UI render: default; VCL: gtk3_kde5; 
Locale: fi-FI (fi_FI.UTF-8); UI-Language: en-US
Calc: threaded
Built on 20 December 2018
Comment 11 Timur 2018-12-20 13:32:19 UTC
Test Windows 7 with Consolas font present. 
Text as seen on the screen with 6.3+ (last one seen "30 json") is not as in attachment 138412 [details] (last one seen "28 unknown").
But "Print Preview" and "Export as PDF" issues still exist. 

Title was "Text is cropped because cell height is small on print preview / PDF".
But if we set auto height, still an issue. 
I'll change the title to indicate this font.
Comment 12 Ferry Toth 2018-12-20 14:08:35 UTC
@Timur

The problem is not caused by font substitution, is so I would just apply another font that doesn't get substituted.

The problem is caused because looking at the spreadsheet on screen gives a different text width then when doing a print / print preview / safe as pdf.

And because we have automatic text reflow on,  the non fitting text flow to the next line. But the row height is not adjusted.

It's a bit nonsensical to ask for a sample spreadsheet. My platform will not have the same text width calculation as yours. I know this because I have Linux, my colleagues have Windows, we all see the same effects but not necessarily in the same cell. 

And anyway it's very easy to reproduce.

But just to humor you, I have an example of the opposite too: on screen the row with 'm m m m ..' is wrapped, but in the print preview that is not needed causing an unneeded empty row.
Comment 13 Ferry Toth 2018-12-20 14:09:26 UTC
Created attachment 147711 [details]
Example of the same problem but opposite