Bug 103318 - libreoffice Math: underbrace and overbrace are totally displaced on screen and printout with OpenGL rendering
Summary: libreoffice Math: underbrace and overbrace are totally displaced on screen an...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Formula Editor (show other bugs)
Version:
(earliest affected)
5.1.5.2 release
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on: hb_ot_math
Blocks: Formula-Editor Font-Rendering VCL-OpenGL
  Show dependency treegraph
 
Reported: 2016-10-18 16:34 UTC by Matthias Morgan
Modified: 2017-03-09 01:37 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
shows the displaced bracket (2.58 KB, image/png)
2016-10-18 16:40 UTC, Matthias Morgan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Morgan 2016-10-18 16:34:52 UTC
Description:
when trying to underbrace or overbrace any kind of formula in LibreOffice Mathe or LibreOffice Writer or ...

the bracket gets totally displaced on screen and on the printout.
Strangely it appears correct if I use the export to PDF. (the funktion built in to LibreO - not if I use an other PDF-Printer)


Steps to Reproduce:
1.open a formula 
2.type some formual with overbrace or underbrace like:
int from 4 to 5 { 2 x + 4 } underbrace {u(X)}


Actual Results:  
3.the displayed formula is no good, the bracket which should underbrace 2 x + 4 is located somewhere. (Sometimes in the middle of the text)

Expected Results:
The bracket should appear at the expected spot, under 2 x + 4 


Reproducible: Always

User Profile Reset: No, but it appears on other Computers at school too, where I don't have the same User Profile as at home

Additional Info:


User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36 OPR/40.0.2308.81
Comment 1 Matthias Morgan 2016-10-18 16:40:48 UTC
Created attachment 128060 [details]
shows the displaced bracket
Comment 2 V Stuart Foote 2016-10-18 21:05:50 UTC
Isolating the two nodes requires an extra space after the integral, so formula needed is

int from {4} to {5} `{2 x + 4} underbrace {u(X)}

However, confirmed on Windows 8.1 Ent 64-bit with *default* graphics rendering
Version: 5.3.0.0.alpha0+
Build ID: d83748d6bfaf97c686ced436506102148e796f34
CPU Threads: 8; OS Version: Windows 6.2; UI Render: default; 
TinderBox: Win-x86@62-merge-TDF, Branch:MASTER, Time: 2016-10-14_08:02:08
Locale: en-US (en_US); Calc: CL

With default rendering, system font Segoe UI is used by SimpleWinLayout and the nodes are misplaced and badly scaled.

However, if you can enable OpenGL with the extra grave space, the nodes are rendered in OpenSymbol, and positioning is close to correct (but the underbrace is still oddly scaled). Multiple glyph brackets need to be implemented at some point to render cleaner formula nodes--ref bug 32362
Comment 3 V Stuart Foote 2016-11-16 06:06:51 UTC
Correct now with default rendering and the new HarfBuzz layout engine. But DirectWrite based OpenGL rendering still has some issues in scaling a glyph to the bounding box of the formula node.

On Windows 10 Pro 64-bit (1607) en-US with
Version: 5.3.0.0.alpha1+
Build ID: 84f644eee78106f01486098d446d9163b62927eb
CPU Threads: 8; OS Version: Windows 6.2; UI Render: default; Layout Engine: new; 
TinderBox: Win-x86@62-merge-TDF, Branch:MASTER, Time: 2016-11-15_23:52:44
Locale: en-US (en_US); Calc: CL


=-ref-= 

https://cgit.freedesktop.org/libreoffice/core/commit/?id=d436065bc1c68fc2d90e73253d8c00503c72dfd0
Comment 4 V Stuart Foote 2017-03-09 01:37:06 UTC
For bug 103831, the removal of DirectWrite Direct2D calls for scaling glyphs with OpenGL and instead using GDI calls corrects this issue as well.

The underbrace and overbrace are correctly scaled in their node.

On Windows 10 Pro 64-bit en-US with
Version: 5.3.2.0.0+
Build ID: a990b46ccc788db45ff4d8f0d47b799782ecb2af
CPU Threads: 8; OS Version: Windows 6.2; UI Render: GL; Layout Engine: new; 
TinderBox: Win-x86@62-merge-TDF, Branch:libreoffice-5-3, Time: 2017-03-08_19:18:26
Locale: en-US (en_US); Calc: CL

http://cgit.freedesktop.org/libreoffice/core/commit/?id=4375eefb644d03ab4bafbc091436166a8494dc91&h=libreoffice-5-3