Bug 104509 - sm Math formula editor distorts glyphs from OpenSymbol font in laying out formulas
Summary: sm Math formula editor distorts glyphs from OpenSymbol font in laying out for...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
5.4.0.0.alpha0+
Hardware: All macOS (All)
: high major
Assignee: ⁨خالد حسني⁩
URL:
Whiteboard: target:5.4.0 target:5.3.2 target:5.3.1
Keywords: regression
: 106112 106135 106498 (view as bug list)
Depends on:
Blocks: Regressions-HarfBuzz
  Show dependency treegraph
 
Reported: 2016-12-08 21:36 UTC by V Stuart Foote
Modified: 2017-03-13 13:14 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
clip of issue in 5.3.0 alpha with new layout (188.85 KB, image/png)
2016-12-08 22:54 UTC, V Stuart Foote
Details
Test Formula file (4.86 KB, application/vnd.oasis.opendocument.formula)
2016-12-09 09:44 UTC, Alex Thurgood
Details
Screenshot 5233 (52.41 KB, image/png)
2016-12-09 09:45 UTC, Alex Thurgood
Details
Screenshot 5400 (67.97 KB, image/png)
2016-12-09 09:46 UTC, Alex Thurgood
Details

Note You need to log in before you can comment on or make changes to this bug.
Description V Stuart Foote 2016-12-08 21:36:51 UTC
Description:
On a current build of 5.4.0 master, sm Math formula editor distorts and dispositions glyphs from OpenSymbol font in laying out formulas.  Apparent on the Elements pane, and in the canvas for the formula.

Enable or disable of OpenGL rendering selection does not affect the poor stretching and mispositioning of the glyphs.

Steps to Reproduce:
1. install current master
2. open a Math formula document
3. select examples from elements pane drop down
4. select the last function [e.g. f ( x ) = {1} over {%sigma sqrt{2%pi} }func e^-{{(x-%mu)^2} over {2%sigma^2}} ]
Note: in the elements pane, and on the formula canvas the glyph for the SQRT radix is stretched very tall, and positioned too high.

5. all "scalable" glyphs in the Brackets section of the elements pane are stretched too tall in the preview, and when select any of the scaled nodes they are likewise stretched too tall in the formula canvas

Actual Results:  
Formula is not rendered well, the radix or brackets are stretched too tall. Other glyphs for nodes in the formula are correct.



Expected Results:
corrects calling and placement of all glyphs composing nodes in the formula


Reproducible: Always

User Profile Reset: No

Additional Info:
Version: 5.4.0.0.alpha0+
Build ID: e61521f6cf0a065d23b420c4007ea224c3070052
CPU Threads: 8; OS Version: Mac OS X 10.12.1; UI Render: GL; 
TinderBox: MacOSX-x86_64@49-TDF, Branch:master, Time: 2016-12-08_18:25:21
Locale: en-US (en_US.UTF-8); Calc: group

master built for Windows on same date is not affected.


User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/602.2.14 (KHTML, like Gecko) Version/10.0.1 Safari/602.2.14
Comment 1 V Stuart Foote 2016-12-08 22:11:17 UTC
Had not looked at an OS X build since the 5.3.0alpaha1 release, so not sure if this is MathML or HarfBuzz affecting the nodes on OS X.

Will try to narrow it down.
Comment 2 V Stuart Foote 2016-12-08 22:54:42 UTC
Created attachment 129410 [details]
clip of issue in 5.3.0 alpha with new layout

Present in Version: 5.3.0.0.beta1
Build ID: 690f553ecb3efd19143acbf01f3af4e289e94536
CPU Threads: 8; OS Version: Mac OS X 10.12.1; UI Render: GL; Layout Engine: new; 
Locale: en-US (en_US.UTF-8); Calc: group

and if I go back to  Version: 5.3.0.0.alpha1, and set a USE_COMMON_LAYOUT
Build ID: f4ca1573fcf445164c068c1046ab5d084e1b005f
CPU Threads: 8; OS Version: Mac OS X 10.12.1; UI Render: GL; 
Locale: en-US (en_US.UTF-8); Calc: group

Not with the old layout. So HarfBuzz not playing nice on OS X with formula editor nodes.
Comment 3 Alex Thurgood 2016-12-09 09:43:13 UTC
Confirming on

Version: 5.4.0.0.alpha0+
Build ID: 9b7ae664e5cf91515435b4b630ffddda57b8d668
CPU Threads: 2; OS Version: Mac OS X 10.12.1; UI Render: default; 
Locale: fr-FR (fr_FR.UTF-8); Calc: group


I have enclosed comparative screenshots of the test formula indicated by Stuart on 5233 and 5400 alpha.
Comment 4 Alex Thurgood 2016-12-09 09:44:45 UTC
Created attachment 129419 [details]
Test Formula file
Comment 5 Alex Thurgood 2016-12-09 09:45:39 UTC
Created attachment 129420 [details]
Screenshot 5233
Comment 6 Alex Thurgood 2016-12-09 09:46:31 UTC
Created attachment 129421 [details]
Screenshot 5400
Comment 7 ⁨خالد حسني⁩ 2017-02-22 21:52:19 UTC
*** Bug 106112 has been marked as a duplicate of this bug. ***
Comment 8 ⁨خالد حسني⁩ 2017-02-22 21:52:54 UTC
*** Bug 106135 has been marked as a duplicate of this bug. ***
Comment 9 Commit Notification 2017-02-22 22:52:31 UTC
Khaled Hosny committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=04d086531ff4a3ab24b704489270c7c23792bd20

tdf#104509: Fix GetGlyphBoundRect on Mac

It will be available in 5.4.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 10 Commit Notification 2017-02-23 12:29:06 UTC
Khaled Hosny committed a patch related to this issue.
It has been pushed to "libreoffice-5-3":

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

tdf#104509: Fix GetGlyphBoundRect on Mac

It will be available in 5.3.2.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 11 Commit Notification 2017-03-02 10:25:53 UTC
Khaled Hosny committed a patch related to this issue.
It has been pushed to "libreoffice-5-3-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=7dc1f5da3581c048d977cb18699fd44ea1c4d465&h=libreoffice-5-3-1

tdf#104509: Fix GetGlyphBoundRect on Mac

It will be available in 5.3.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 12 shannon 2017-03-02 22:49:57 UTC
I can confirm that it is fixed in the current nightly build of 5.3.2.0.0. Thank you Khaled Hosny.
Comment 13 shannon 2017-03-08 18:57:39 UTC
I just tested release candidate 5.3.1.1 and found that the bug still exists.

(In reply to Commit Notification from comment #11)
> Khaled Hosny committed a patch related to this issue.
> It has been pushed to "libreoffice-5-3-1":
> 
> http://cgit.freedesktop.org/libreoffice/core/commit/
> ?id=7dc1f5da3581c048d977cb18699fd44ea1c4d465&h=libreoffice-5-3-1
> 
> tdf#104509: Fix GetGlyphBoundRect on Mac
> 
> It will be available in 5.3.1.
> 
> The patch should be included in the daily builds available at
> http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
> information about daily builds can be found at:
> http://wiki.documentfoundation.org/Testing_Daily_Builds
> 
> Affected users are encouraged to test the fix and report feedback.
Comment 14 V Stuart Foote 2017-03-08 19:46:41 UTC
(In reply to shannon from comment #13)
> I just tested release candidate 5.3.1.1 and found that the bug still exists.
> 
The 5.3.1.1 build (2017-02-23) [1] would not have the patch. You need the 5.3.1.2 rc2 build (2017-03-08)[2]

=-ref-=
[1] http://downloadarchive.documentfoundation.org/libreoffice/old/5.3.1.1/mac/x86_64/LibreOffice_5.3.1.1_MacOS_x86-64.dmg.mirrorlist

[2] http://dev-builds.libreoffice.org/pre-releases/mac/x86_64/LibreOffice_5.3.1.2_MacOS_x86-64.dmg
Comment 15 shannon 2017-03-08 22:41:55 UTC
(In reply to V Stuart Foote from comment #14)

Thank you! I confirm the patch works in 5.3.1.2.
Comment 16 ⁨خالد حسني⁩ 2017-03-13 13:14:12 UTC
*** Bug 106498 has been marked as a duplicate of this bug. ***