Bug 89356 - in exported PDF sqrt sign has displaced horizontal bar
Summary: in exported PDF sqrt sign has displaced horizontal bar
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Formula Editor (show other bugs)
Version:
(earliest affected)
4.3.6.2 release
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:pdf
Depends on:
Blocks: PDF-Export
  Show dependency treegraph
 
Reported: 2015-02-13 06:10 UTC by Yury
Modified: 2020-07-13 13:04 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
proof doc (27.59 KB, application/vnd.oasis.opendocument.text)
2015-02-13 06:11 UTC, Yury
Details
pdf render (XITS Math substituted for OpenSymbol) (29.67 KB, application/pdf)
2015-02-13 06:12 UTC, Yury
Details
pdf export (Times New Roman in formulas and OpenSymbol NOT substituted) (38.01 KB, application/pdf)
2015-02-13 06:15 UTC, Yury
Details
pdf render of the ODT doc with just OpenSymbol NOT substituted (notice the breaking of the 1st formula) (29.62 KB, application/pdf)
2015-02-13 06:16 UTC, Yury
Details
proof doc, times new roman from MS webfonts (26.97 KB, application/vnd.oasis.opendocument.text)
2015-02-13 16:37 UTC, Yury
Details
pdf render of the times new roman doc (54.63 KB, application/pdf)
2015-02-13 16:39 UTC, Yury
Details
modified test file (51.46 KB, application/pdf)
2015-02-14 09:08 UTC, Jean-Baptiste Faure
Details
2016-04-18 pdf created in 5.1.2.1.0 (29.69 KB, application/pdf)
2016-04-18 07:28 UTC, Yury
Details
proofdoc in Times New Roman, PDF at 1552%, 6.1.5.2, 1st example (58.79 KB, image/jpeg)
2019-08-06 05:31 UTC, Yury
Details
proofdoc in Times New Roman, PDF at 1552%, 6.1.5.2, 2nd example (59.34 KB, image/jpeg)
2019-08-06 05:31 UTC, Yury
Details
proofdoc in Times New Roman, PDF at 1552%, 6.1.5.2, 3rd example (36.04 KB, image/jpeg)
2019-08-06 05:32 UTC, Yury
Details
proofdoc in Times New Roman, PDF at 1552%, 6.2.5.2, 1st example (57.86 KB, image/jpeg)
2019-08-06 05:32 UTC, Yury
Details
proofdoc in Times New Roman, PDF at 1552%, 6.2.5.2, 2nd example (60.38 KB, image/jpeg)
2019-08-06 05:33 UTC, Yury
Details
proofdoc in Times New Roman, PDF at 1552%, 6.2.5.2, 3rd example (35.01 KB, image/jpeg)
2019-08-06 05:33 UTC, Yury
Details
Displaced bar in sqrt compared to latex output (9.96 KB, application/pdf)
2020-07-13 11:30 UTC, davidegx
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yury 2015-02-13 06:10:34 UTC
In exported PDF, in `sqrt` sign rendering, the horizontal bar is displaced, either vertically, or horizontally, or both, depending on what typographic environment `sqrt` is placed in. Proof doc and pdf are attached.

I have OpenSymbol substituted with XITS Math (have to keep the same font style for text and formulas), and formulas are in 14pt. In this setup the problem is very visible. However, the out-of-the-box OpenSymbol has the same problem, only less pronounced. Proof pdf is attached.

P.S. As the issue, which might or might not merit a separate ticket -- notice how `sqrt {whatever} ^{}` is rendered with extra vertical spacing *under* the sqrt bar -- definitely error in parser.
Comment 1 Yury 2015-02-13 06:11:24 UTC
Created attachment 113355 [details]
proof doc
Comment 2 Yury 2015-02-13 06:12:22 UTC
Created attachment 113356 [details]
pdf render (XITS Math substituted for OpenSymbol)
Comment 3 Yury 2015-02-13 06:15:23 UTC
Created attachment 113357 [details]
pdf export (Times New Roman in formulas and OpenSymbol NOT substituted)
Comment 4 Yury 2015-02-13 06:16:24 UTC
Created attachment 113358 [details]
pdf render of the ODT doc with just OpenSymbol NOT substituted (notice the breaking of the 1st formula)
Comment 5 Jean-Baptiste Faure 2015-02-13 06:26:36 UTC
Do you reproduce the same problem if you use a standard font for text and formula?

I can't try your file because I do not have the XITS installed.

Set status to NEEDINFO. Please set it back to UNCONFIRMED once you have provided the requested informations.

Best regards. JBF
Comment 6 Yury 2015-02-13 16:37:57 UTC
Created attachment 113371 [details]
proof doc, times new roman from MS webfonts
Comment 7 Yury 2015-02-13 16:39:06 UTC
Created attachment 113372 [details]
pdf render of the times new roman doc
Comment 8 Yury 2015-02-13 16:45:39 UTC
Yes, the issue is there with standard fonts, e.g., using the Times New Roman from MS webfonts. The displacement is different, but it is definitely there. 

P.S. Peculiarly, generally with this issue, regardles of font used, when formula is open for editing in Math, the preview looks "ideal". After Math is closed, the slightly incorrect render is back. As far as I can tell, the (displaced) exported PDF render duplicates the completed (not-being-edited) render in Writer.

P.P.S. The XITS/XITS Math 1.108 taken from CTAN was responsible for the complete render break in the 4th attachment. The updated XITS/XITS Math from Github does not have that problem.
Comment 9 Jean-Baptiste Faure 2015-02-14 09:08:59 UTC
Created attachment 113376 [details]
modified test file

I edited each formula and added one from the examples collection, then exported as pdf. It is better but its true that the horizontal bar of the square root sign does not match exactly the skew part.

Set status to NEW.

Best regards. JBF
Comment 10 Jean-Baptiste Faure 2015-02-14 09:13:04 UTC
Not exactly the same problem as bug 60268 but very close.

Best regards. JBF
Comment 11 QA Administrators 2016-02-21 08:37:45 UTC Comment hidden (obsolete)
Comment 12 Yury 2016-04-18 07:28:38 UTC
Created attachment 124448 [details]
2016-04-18 pdf created in 5.1.2.1.0

Better, but somehow still not yet there. Could this be improved?
Comment 13 QA Administrators 2017-10-30 08:30:14 UTC Comment hidden (obsolete)
Comment 14 Roman Kuznetsov 2018-07-25 18:40:35 UTC
still repro in

Version: 6.1.0.2 (x64)
Build ID: b3972dcf1284967612d5ee04fea9d15bcf0cc106
CPU threads: 4; OS: Windows 10.0; UI render: GL; 
Locale: ru-RU (ru_RU); Calc: CL
Comment 15 QA Administrators 2019-07-30 03:12:55 UTC Comment hidden (obsolete)
Comment 16 Yury 2019-08-06 05:30:12 UTC
Checked with 6.1.5.2 and 6.2.5.2, with 'times new roman' proofdoc (https://bugs.documentfoundation.org/attachment.cgi?id=113371).
Opened, reclicked all formulas, produced PDFs, looked at those at 1552% zoom in qpdfview.

The issue isn't nowhere as drastic as 4 years ago, however, there still are small-ish gaps and misaligns, which are definitely visible / noticeable even at 100% zoom.

Next, I'm attaching six jpegs of the proofdoc PDF conversion, as seen at 1552% in two versions of LO, 6.1.5.2 and 6.2.5.2 (three examples per doc).
Comment 17 Yury 2019-08-06 05:31:18 UTC
Created attachment 153151 [details]
proofdoc in Times New Roman, PDF at 1552%, 6.1.5.2, 1st example
Comment 18 Yury 2019-08-06 05:31:40 UTC
Created attachment 153152 [details]
proofdoc in Times New Roman, PDF at 1552%, 6.1.5.2, 2nd example
Comment 19 Yury 2019-08-06 05:32:02 UTC
Created attachment 153153 [details]
proofdoc in Times New Roman, PDF at 1552%, 6.1.5.2, 3rd example
Comment 20 Yury 2019-08-06 05:32:37 UTC
Created attachment 153154 [details]
proofdoc in Times New Roman, PDF at 1552%, 6.2.5.2, 1st example
Comment 21 Yury 2019-08-06 05:33:03 UTC
Created attachment 153155 [details]
proofdoc in Times New Roman, PDF at 1552%, 6.2.5.2, 2nd example
Comment 22 Yury 2019-08-06 05:33:27 UTC
Created attachment 153156 [details]
proofdoc in Times New Roman, PDF at 1552%, 6.2.5.2, 3rd example
Comment 23 davidegx 2020-07-13 11:30:25 UTC
Created attachment 162963 [details]
Displaced bar in sqrt compared to latex output

I've noticed the displacement also, not that is huge but you can notice something odd when you zoom a bit. If you zoom to 400%, the is clearly there.

I've put in the attached file a comparative with Latex (done via TexMaths) plugin.