Bug 103588 - With experimental Harfbuzz common layout, Math Formula editor having noticeable font fallback issue for OpenSymbol
Summary: With experimental Harfbuzz common layout, Math Formula editor having noticeab...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
5.3.0.0.alpha0+
Hardware: All Windows (All)
: medium normal
Assignee: ⁨خالد حسني⁩
URL:
Whiteboard: target:5.3.0
Keywords:
Depends on:
Blocks: HarfBuzz
  Show dependency treegraph
 
Reported: 2016-10-30 17:44 UTC by V Stuart Foote
Modified: 2018-05-31 17:10 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
Math formula document, 4th on list, with font fallback affecting OpenSymbol (60.23 KB, image/png)
2016-10-30 17:46 UTC, V Stuart Foote
Details
Math formula document, 5th on list, with font fallback affecting OpenSymbol (52.74 KB, image/png)
2016-10-30 17:52 UTC, V Stuart Foote
Details
Math formula document (4th & 5th eamples) with font fallback issues with highlighted errors (70.68 KB, image/png)
2016-10-30 17:53 UTC, V Stuart Foote
Details

Note You need to log in before you can comment on or make changes to this bug.
Description V Stuart Foote 2016-10-30 17:44:49 UTC
Description:
On current Windows build of master with SAL_USE_COMMON_LAYOUT environment set, running the Math module Formula editor is having some issues with font fall back for OpenSymbol fonts.

Steps to Reproduce:
On Windows 10 Pro 64-bit en-US with
Version: 5.3.0.0.alpha1+
Build ID: f19f88a0d49859eb714711cac72793f09f5f7d5c
CPU Threads: 8; OS Version: Windows 6.2; UI Render: GL; 
TinderBox: Win-x86@62-merge-TDF, Branch:MASTER, Time: 2016-10-29_06:17:53
Locale: en-US (en_US); Calc: CL

1. enable HarfBuzz based Common Layout with env variable
2. OpenGl rendering enabled
3. open a new Formula from Start Center
4. from the Element Dock (panel on the left) select Examples from dropdown list
5. select the f(x) with summation (4th sample of the list)
6. selecting the formula writes StarMath markup "f ( x ) = sum from { { i = 0 } } to { infinity } { {f^{(i)}(0)} over {i!} x^i}" into the lower Fromula editor's panel.  And the formula will render to the Preview Window.
7. Zoom-out or Zoom-in or "Show All" to scale the formula preview 

Actual Results:  
Preview will sometimes show the OpenGL symbols, but sometimes shows the symbols in what appears to be Segoe UI -- but for dfferent code points.

Similar with other example formulas--wrong font for symbol codepoints.

Attaching screen clips.

Expected Results:
No visual glitch, and canvas of the Preview window reliably render the OpenSymbol


Reproducible: Always

User Profile Reset: Yes

Additional Info:
Setting a font substitution for OpenSymbol with Asana Math or STIX (from Tools -> Options -> Fonts) does not exhibit the issue.


User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:49.0) Gecko/20100101 Firefox/49.0
Comment 1 V Stuart Foote 2016-10-30 17:46:12 UTC
Created attachment 128367 [details]
Math formula document, 4th on list, with font fallback affecting OpenSymbol
Comment 2 V Stuart Foote 2016-10-30 17:52:20 UTC
Created attachment 128368 [details]
Math formula document, 5th on list, with font fallback affecting OpenSymbol

Enabling Math's "Visual Mode" by enabling experimental features, or enabling or disabling OpenGL has no effect on the glitch.
Comment 3 V Stuart Foote 2016-10-30 17:53:51 UTC
Created attachment 128369 [details]
Math formula document (4th & 5th eamples) with font fallback issues with highlighted errors
Comment 4 V Stuart Foote 2016-10-30 18:01:47 UTC
To be clear, the fallback font/canvas composition issue with HarfBuzz is transient, affecting just the canvas refresh of Math's preview canvas and examples on its Element pane.  A zoom in or out will eventually redraw with a correct glyph.
Comment 5 V Stuart Foote 2016-10-30 18:21:02 UTC
@Takeshi, Frédéric, Regina

As here, Khaled is looking for feedback on function of the experimental HarfBuzz based shaping. Could use some help poking at the Math Formula editor with the new common layout--consistency of behavior for all OS, but Windows probably has the most demand.

Stuart
Comment 6 ⁨خالد حسني⁩ 2016-10-30 19:00:04 UTC
I can reproduce this locally. Happens randomly as one zooms in/out.
Comment 7 Commit Notification 2016-10-30 20:12:52 UTC
Khaled Hosny committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=641b9cb1d0934b3f8b4a80279cb3f3f81ecc4707

tdf#103588: Draw with the right font on Windows

It will be available in 5.3.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 8 ⁨خالد حسني⁩ 2016-10-30 20:15:10 UTC
The above change seems to fix the issue for me, but since it wasn’t reliably reproducible I’d like another confirmation it is fixed before closing this.
Comment 9 Takeshi Abe 2016-10-31 07:13:47 UTC
Seems fixed, I could not reproduce the glitch on Windows 10 64bit:

Version: 5.3.0.0.alpha1+
Build ID: 49909dca5856aada5340d44f03a271d38e038039
CPU Threads: 12; OS Version: Windows 6.19; UI Render: GL; Layout Engine: new; 
Locale: en-US (en_US); Calc: CL
Comment 10 ⁨خالد حسني⁩ 2016-10-31 11:18:34 UTC
(In reply to Takeshi Abe from comment #9)
> Seems fixed, I could not reproduce the glitch on Windows 10 64bit:

Thanks for the confirmation, can you check also bug 103590?
Comment 11 V Stuart Foote 2016-10-31 15:34:44 UTC
Yes it is fixed now.

Version: 5.3.0.0.alpha1+
Build ID: 4b4abb73fcd7f2802e73102b3e7c30face8d309c
CPU Threads: 8; OS Version: Windows 6.19; UI Render: GL; Layout Engine: new; 
TinderBox: Win-x86@39, Branch:master, Time: 2016-10-31_02:54:50
Locale: en-US (en_US); Calc: CL