Bug 60268 - Segoe UI system font incorrectly replacing OpenSymbol glyphs in formulas on Windows 8, 8.1 and 10
Summary: Segoe UI system font incorrectly replacing OpenSymbol glyphs in formulas on W...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
4.0.0.3 release
Hardware: Other Windows (All)
: highest normal
Assignee: Not Assigned
URL:
Whiteboard: BSA target:5.3.0
Keywords:
: 61371 61622 62455 72731 89303 95915 98626 (view as bug list)
Depends on: HarfBuzz
Blocks:
  Show dependency treegraph
 
Reported: 2013-02-04 10:18 UTC by sas1981
Modified: 2016-11-06 18:39 UTC (History)
22 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot of the described problem (17.66 KB, image/png)
2013-02-04 10:18 UTC, sas1981
Details
OpenSymbol font file that works with Windows 8 (45.07 KB, application/zip)
2015-02-12 23:40 UTC, Martin G.
Details
Version 3 of my patched OpenSymbol font file for Windows 8 - now with corrected underbrace (45.12 KB, application/zip)
2015-02-15 12:53 UTC, Martin G.
Details
Broken root under Windows 10 (1.28 KB, image/png)
2016-02-08 15:29 UTC, Platon Efimov
Details
sample of new HarfBuzz based shaping, and GreekCharStyle 2 set -- OpenSymbol restored (61.36 KB, image/png)
2016-10-31 23:37 UTC, V Stuart Foote
Details
same sample formula with new HarfBuzz based shaping but without OpenGL, more presentable (57.64 KB, image/png)
2016-10-31 23:57 UTC, V Stuart Foote
Details
Comparison Software/OpenGL x86/x64 part 1: old layout engine (170.12 KB, image/png)
2016-11-02 05:09 UTC, Mike Kaganski
Details
Comparison Software/OpenGL x86/x64 part 2: HarfBuzz layout engine (179.77 KB, image/png)
2016-11-02 05:10 UTC, Mike Kaganski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description sas1981 2013-02-04 10:18:07 UTC
Created attachment 74166 [details]
Screenshot of the described problem

Mathematical Symbols like "cdot" or "sqrt" are displaced when using Windows 8.

1. Enter simple formula like: a cdot b
2. The cdot is shifted to the left and almost overlaps with the a

or

1. Enter: sqrt{a over b}
2. The sqrt-operator is not drawn correctly

Formatting settings are default.
Font is "Times New Roman". I have tried other fonts as well with the same result.

When exporting the document containing the formula to pdf then everything is displayed correctly.

              
Operating System: Windows 8
Version: 4.0.0.3 rc
Comment 1 Thomas van der Meulen [retired] 2013-02-10 18:04:43 UTC
Tank you for reporting this bug, 
I can't reproduce this bug running LibreOffice 4.0.0.3 on Windows 7 

I think its just a Windows 8 bug, I wil try to reporuce it later on a Windows 8 PC
Comment 2 Thomas van der Meulen [retired] 2013-02-15 16:12:34 UTC
Thank you for reporting this bug, 
I can reproduce this bug running LibreOffice 4.0.0.3 on Windows 8.
Comment 3 Jorendc 2013-02-23 23:06:25 UTC
*** Bug 61371 has been marked as a duplicate of this bug. ***
Comment 4 Mike Kaganski 2013-03-10 04:41:01 UTC
Still reproducible with 4.0.1.2 under Win8
Comment 5 Jacques Guilleron 2013-03-10 09:09:10 UTC
Hi,

It seems that Opensymbol font, which is used for all signs, was changed by Liberation only for Windows 8. This is confirmed on several machines on qa-fr lists and bug 61622 I mark as a Duplicate of this one.

Jacques Guilleron
Comment 6 Jacques Guilleron 2013-03-10 09:12:21 UTC
*** Bug 61622 has been marked as a duplicate of this bug. ***
Comment 7 Kamyllus 2013-04-11 06:15:11 UTC
Still reproducible with 4.0.2.2 under Windows 8
Comment 8 Matt Matthews 2013-08-28 11:24:18 UTC
I'm very interested in getting this bug fixed. My wife uses LibreOffice for all of her teaching materials, and now that her new laptop has Windows 8, the mathematics formatting is completely broken.

Does anyone have any idea why this regression on Windows 8 only?
Comment 9 tommy27 2013-11-02 08:26:38 UTC
hi, have u tried installing brand new 4.1.3 release?
is the bug still there in Win8?
Comment 10 Björn Michaelsen 2014-01-17 09:58:42 UTC Comment hidden (obsolete)
Comment 11 Andrea 2014-01-31 10:30:59 UTC
Still reproducible with 4.2.0.4 under Windows 8
Comment 12 Stéphane Guillou (stragu) 2014-02-13 23:09:55 UTC
Moving to mab4.1 (Bug 60270) because:
- 4.0 reached EOL (End Of Life)
- bug confirmed in later version
Comment 13 Falk Bittermann 2014-03-31 19:15:09 UTC
This weekend LibreOffice was presented at a fair. We tested the new 4.2.2 on a Windows 8 machine, the bug was as reported. On a Windows 7 machine the display was much better. So it still happens ...
Comment 14 tommy27 2014-05-02 16:17:34 UTC
moving to mab4.2 since 4.1.x is END OF LIFE
Comment 15 ign_christian 2014-08-14 02:09:39 UTC
Same suspicion as Jacques, probably it's about OpenSymbol font.

Anyone using Windows please see Bug 76239, especially: https://bugs.freedesktop.org/show_bug.cgi?id=76239#c18 about how to get the font.

Does it resolved the problem?
Comment 16 tommy27 2014-11-29 17:41:59 UTC
bug persists under Win8.1x64 using  4.5.0.0.alpha0+
Build ID: 84a6d8eeaab540e5b2ea3baffd919903dff8c247
TinderBox: Win-x86@39, Branch:master, Time: 2014-11-22_23:41:04

moving bug to mab4.3 list since 4.2.x is EOL
Comment 17 Wolfgang Jäger 2014-12-17 11:24:53 UTC
Want to confirm bug for LibreOffice 4.3.4.1 under Win8.1.
Comment 18 Wolfgang Jäger 2014-12-17 12:24:16 UTC
... and for 4.3.5.1 under Win8.1
Comment 19 Andrea 2014-12-23 13:02:56 UTC
Still reproducible with 4.3.5.2 on Windows 8.
Comment 20 Martin G. 2015-02-12 23:40:16 UTC
Created attachment 113353 [details]
OpenSymbol font file that works with Windows 8

Here comes the solution for this problem: a modified OpenSymbol font file.
Comment 21 Jean-Baptiste Faure 2015-02-14 09:16:17 UTC
*** Bug 72731 has been marked as a duplicate of this bug. ***
Comment 22 David Elm 2015-02-14 09:21:22 UTC
Uninstalled and reinstalled LibreOffice.  Then installed the OpenSymbol font.  

This fixed a lot of equation issues, but now there is a box where the underbrace should be.  

Running LO 4.4.0.3 on Windows 8.1.
Comment 23 Frédéric Wang 2015-02-14 10:22:27 UTC
(In reply to Martin G. from comment #20)
> Created attachment 113353 [details]
> OpenSymbol font file that works with Windows 8
> 
> Here comes the solution for this problem: a modified OpenSymbol font file.

I believe the proper way to update the font is to modify

  extras/source/truetype/symbol/OpenSymbol.sfd

(to obtain a readable "patch") and to regenerate opens___.ttf with fontforge.
Comment 25 Martin G. 2015-02-15 12:51:53 UTC
(In reply to David Elm from comment #22)
> This fixed a lot of equation issues, but now there is a box where the
> underbrace should be.  

I've checked this and on my system (Win 8.1) I've seen the underbrace from "Segoe UI Symbol" (thicker) because char 0x23DF was still missing in my patched font file (which causes OO to use Segoe UI Symbol as a fallback). So please find the "extended version 3" of my modified OpenSymbol, now including the underbrace and the overbrace.

@ Frédéric: Since now my patched font file is the one and only solution for the Win8-problem of Open Office. If you know how to do it better, please feel free to do so!
Comment 26 Martin G. 2015-02-15 12:53:17 UTC
Created attachment 113397 [details]
Version 3 of my patched OpenSymbol font file for Windows 8 - now with corrected underbrace
Comment 27 Martin G. 2015-02-15 13:05:32 UTC
(In reply to David Elm from comment #22)
> Uninstalled and reinstalled LibreOffice.  Then installed the OpenSymbol
> font.  

It is not necessary to re-install Libre Office for changing the font file. You should select the "OpenSymbol Standard" font in Windows\Fonts and click "delete". Then unzip the new font file, right-click on the file and select "install".

Now start Libre Office again and open the document. If the underbrace symbol has not changed imediately please enter the formula editor (double click on the formula). Usually this should redraw the formula and show the correct glyphs.

(I work with Open Office but I think the behaviour of Libre Office is similar.)
Comment 28 Frédéric Wang 2015-02-15 13:57:08 UTC
(In reply to Martin G. from comment #25)
> @ Frédéric: Since now my patched font file is the one and only solution for
> the Win8-problem of Open Office. If you know how to do it better, please
> feel free to do so!

I was not commenting on your font file (I didn't even try to see what changes you did). My point is that the proper way to have your changes accepted by the LibreOffice reviewers is a patch that changes the text source OpenSymbol.sfd and regenerates the opens___.ttf (see my previous link and what I did in http://cgit.freedesktop.org/libreoffice/core/commit/extras/source/truetype/symbol/?id=c5887193572ea1295b9d36008af5851127fd9647). Hope that helps...
Comment 29 Martin G. 2015-02-15 15:15:32 UTC
(In reply to Frédéric Wang from comment #28)
> My point is that the proper way to have your changes
> accepted by the LibreOffice reviewers is a patch that changes the text
> source OpenSymbol.sfd and regenerates the opens___.ttf

I think my "patch" is more a work-around than the full solution. I felt that no one of the programmers is working on that bug because it is mentioned in several forums but without any progress. So I tried to check what's wrong with the font file and indeed "fontforge" shows a lot of errors when you validate the file, see https://forum.openoffice.org/en/forum/viewtopic.php?f=15&t=73057&p=336508#p336622 . Then I looked for older versions and I found the very old version 1.7 to be Windows 8 compatible. Unfortunately this old version is lacking several glyphs (e. g. the up-right greek letters and the 'underbrace' as mentioned above). Therefore I used "fontforge" to copy the missing glyphs into that file but I don't think that I got all missing glyphs. For my documents it worked and as I saw from other forums for several other users it works, too.

However, the right way for Open Office and Libre Office should be that the programmers who have a deep knowledge about true-type fonts (I don't have this knowledge) correct all the bugs in the current version (2.4.3) instead of doing the step back to version 1.7.
But meanwhile my patch old version is better than no solution for Win 8 users.
Comment 30 Takeshi Abe 2015-02-25 08:24:45 UTC
*** Bug 89303 has been marked as a duplicate of this bug. ***
Comment 31 Jean-Baptiste Faure 2015-03-01 08:57:24 UTC
*** Bug 62455 has been marked as a duplicate of this bug. ***
Comment 32 Kamyllus 2015-11-05 07:17:50 UTC
After two and a half years and after five releases from LibO 4.0 this bug is still reproducible with LibreOffice 5.0.2.2 under Windows 10. Amazing!
Comment 33 tommy27 2015-11-05 08:45:17 UTC
you may help too fixing this issue...
there are many ways you can contribute:

1- coding (if you are a programmer)
2- testing older releases to see if it ever worked before and in the case this is a regression do a bibisect (more info on the Wiki)
3- crowdfunding at https://freedomsponsors.org/
Comment 34 Roger 2015-11-14 12:21:46 UTC
Reproduced on Windows 10 x64

Versió: 5.0.3.2
ID de la construcció: e5f16313668ac592c1bfb310f4390624e3dbfb75
Configuració local: ca-ES (ca_ES)
Comment 35 Roger 2015-11-14 12:27:02 UTC
(In reply to tommy27 from comment #33)
> you may help too fixing this issue...
> there are many ways you can contribute:
> 
> 1- coding (if you are a programmer)
> 2- testing older releases to see if it ever worked before and in the case
> this is a regression do a bibisect (more info on the Wiki)
> 3- crowdfunding at https://freedomsponsors.org/

I'm interested in crowfunding but I don't see this bug on https://freedomsponsors.org/
Comment 36 tommy27 2015-11-14 23:40:44 UTC
you can add this bug and start a crowdfunding clicking here:
https://freedomsponsors.org/issue/add
Comment 37 Pierre C 2015-11-19 12:20:20 UTC
I've got the same problem with Windows 10

LO 4.4.7.1. So title may be changed to Windows 8 or later
Comment 38 Georg Aubele 2016-01-14 09:48:43 UTC
Windows 10, LO 5.1.0.2 (RC2)
Bug still reproducable.

The bug is still not assigned to anyone ... :(

I installed a LO-Verson from August 2012 (3.5.6(RC2)) and there it is the same ...
Comment 39 Georg Aubele 2016-01-14 10:03:11 UTC
Additional observation:
If you change the OS while working on it, the root looks even worse ...

How to reproduce:

1. Start working on a formula under Windows 8 or 10
2. Save dokument and change OS to Linux.
3. Open doc and formula under Linux and work on it (looks good under linux)
4. Save doc under Linux
5. Start Windows again and open document - the upper dash of the root sign is even more delocated. You have to double click every formula to get it back to the "bad Windows look".
Comment 40 Platon Efimov 2016-02-08 15:29:12 UTC
Created attachment 122445 [details]
Broken root under Windows 10
Comment 41 m_a_riosv 2016-03-13 02:37:59 UTC
*** Bug 98626 has been marked as a duplicate of this bug. ***
Comment 42 Georg Aubele 2016-03-13 09:23:27 UTC
I think this bug also is connected to the mathematical symbols (like "in", |R and |N) beeing displayed way to small on Windows 8 and above.

How to reproduce:
1. Open a document under windows 8 or above
2. Type some text and open formula editor
3. type 
   a in setR
4. Compare the size of the Text and the a to the element symbol and the |R.

Could please somone take care of that bug, it is really annoying and seems to be a bigger one as it affects almost every aspect of the formula editor. :/

Unfortunately I'm not able to do so.
Comment 43 m_a_riosv 2016-03-16 21:53:54 UTC
*** Bug 98626 has been marked as a duplicate of this bug. ***
Comment 44 o-weh1 2016-03-17 16:50:13 UTC
Hello everyone,

I would like to point out one aspect that is mentioned in the beginning of this bug as well as in https://bugs.documentfoundation.org/show_bug.cgi?id=72731 
The exported pdf seems to be right in both cases.
To me (who doesn't have deep knowlede of LO's structure) that means that the fault results from a component that is not shared between the pdf export, the pdf reader and the graphical display in LO. I would guess that the fonts are shared for everything running on the machine, so the main error shouldn't be in the font file. Instead I would suggest to search in the modules of LO that generate the view in the writer.
Is this correct?
Comment 45 Georg Aubele 2016-03-17 19:25:58 UTC
As it should be the same font in Linux as in Windows and in Windows 7 there is no problem with it, it can't IMHO not be font specific.
Something changed with Windows 8 an 10.
Comment 46 Gisbert 2016-10-31 19:11:33 UTC
The bug makes the Math module useless under Windows 10.
Please set the importace to "critical".
Comment 47 Pierre C 2016-10-31 20:11:31 UTC
I've found a workaround :

Go to Tools>Options>advanced Options and click on "Open advanced configuration"

Search for opensymbol string

Then go to FontFormatList and change the 2 items values from opensymbol to Symbol

It works fine with me on W10
Comment 48 Georg Aubele 2016-10-31 21:01:23 UTC
Does not work for me, the square roots still look pretty silly.
Comment 49 V Stuart Foote 2016-10-31 23:10:24 UTC
*** Bug 95915 has been marked as a duplicate of this bug. ***
Comment 50 V Stuart Foote 2016-10-31 23:27:33 UTC
The new HarfBuzz based common layout corrects the incorrect use of Segoe UI in Windows 8, 8.1 and 10 installs.

The new layout is available in 5.3.0alpha1+ and current master--it is currently experimental (enable by setting a variable SAL_USE_COMMON_LAYOUT). It is being finalized and with project ESC approval may be implemented as default for the 5.3.0 release.

It will not be back-ported to 5.2 

Please check out a current master, and set variable to test the new layout--it resolves many font rendering issues affecting the Windows builds.

OpenSymbol rendering in formula nodes containing cdot, sqrt, nroot and the over bars are much improved.  Still some work needed to the source to fully cleanup scaling of OpenSymbol fonts--but things are better with the formula editor on Windows 8, 8.1 and 10 with the HarfBuzz layout engine.
Comment 51 V Stuart Foote 2016-10-31 23:37:49 UTC
Created attachment 128395 [details]
sample of new HarfBuzz based shaping, and GreekCharStyle 2 set -- OpenSymbol restored

attached a clip of Math formula using the HarfBuzz based common layout on Windows 8.1 Pro with
Version: 5.3.0.0.alpha1+
Build ID: 4b4abb73fcd7f2802e73102b3e7c30face8d309c
CPU Threads: 8; OS Version: Windows 6.29; 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 

The GreekCharStyle is set to 2 (from Tools -> Options -> Advanced: Expert Configuration), so Greek Capitals are regular while greek Lowers are italic.

the formula displayed is:

prod %PI %pi sum %SIGMA %sigma int iint coprod a newline
nroot{3}{27} cdot sqrt{9}

The node for the sqrt and the nroot do not quite scale the root sign to join the overbar -- but position is correct, and substituting a STIX or Asana root sign does close the gap. So the glyph metrics for the OpenSymbol root can probably be corrected, or the source for building the node.

The issue here of incorrectly using Segoe UI system font is resolved.
Comment 52 V Stuart Foote 2016-10-31 23:57:11 UTC
Created attachment 128396 [details]
same sample formula with new HarfBuzz based shaping but without OpenGL, more presentable

The same formula with HarfBuzz common layout but without OpenGL rendering.
Better shaping of the roots and the overbars, presentable.

Composition of nodes with the OpenGL rendering still need attention.
Comment 53 Mike Kaganski 2016-11-02 04:17:43 UTC
(In reply to V Stuart Foote from comment #51)
> The node for the sqrt and the nroot do not quite scale the root sign to join
> the overbar -- but position is correct, and substituting a STIX or Asana
> root sign does close the gap. So the glyph metrics for the OpenSymbol root
> can probably be corrected, or the source for building the node.

Comparing with the next attachment, I suppose that the issue isn't wrong scale, but some clipping of properly scaled and positioned glyph
Comment 54 Mike Kaganski 2016-11-02 05:09:12 UTC
Created attachment 128423 [details]
Comparison Software/OpenGL x86/x64 part 1: old layout engine
Comment 55 Mike Kaganski 2016-11-02 05:10:49 UTC
Created attachment 128424 [details]
Comparison Software/OpenGL x86/x64 part 2: HarfBuzz layout engine

Unfortunately, there are still problems with Win10. I didn't modify GreekCharStyle.
Comment 56 V Stuart Foote 2016-11-05 05:43:20 UTC
Closing this as issue is resolved fixed by commits for bug 89870 for both OpenGL and default rendering with the HarfBuzz based common layout. With the new layout, system font Segoe UI is no longer being used in formulas on Windows 8, 8.1, 10


@Mike K, *
Issues of composing the ROOT NROOT and OVER nodes are in bug 99351, noting your attachment 128423 [details] and attachment 128424 [details] there.