Bug 128226 - Make sure OpenSymbol font is always available
Summary: Make sure OpenSymbol font is always available
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium enhancement
Assignee: Mike Kaganski
URL:
Whiteboard: target:6.5.0
Keywords:
Depends on:
Blocks: Fonts
  Show dependency treegraph
 
Reported: 2019-10-18 10:07 UTC by Mike Kaganski
Modified: 2020-01-14 12:36 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kaganski 2019-10-18 10:07:35 UTC
OpenSymbol font is an essential component for Math. When it's absent in system, possibly it would be good to show a warning (no idea which kind: a messagebox, or an infobar?) that it's absent, and is needed for correct operation.

E.g., see https://ask.libreoffice.org/en/question/213494/
Comment 1 Roman Kuznetsov 2019-10-18 10:25:33 UTC
It's general problem linked with https://design.blog.documentfoundation.org/2016/10/21/dealing-with-missing-fonts/

Of course I agree with that general idea
Comment 2 Roman Kuznetsov 2019-10-18 10:28:56 UTC

*** This bug has been marked as a duplicate of bug 78186 ***
Comment 3 Mike Kaganski 2019-10-18 10:44:29 UTC
While I agree with this being related to tdf#78186, these are different bugs. In case of Math, the OpenSymbol font isn't *used in the document* - it's Math itself that *internally* uses this font to draw math symbols, like integrals and square roots. OpenSymbol font is a component of Math in that regard, not a used resource, which is very different.
Comment 4 Mike Kaganski 2019-10-18 11:18:59 UTC
To further clarify the difference with tdf#78186: that bug is to show warning *if a document uses some font absent on system*; this bug is about "When we open Math, we must check if a component required for its correct work is present, and warn if not". So this one is orthogonal to fonts *used in documents*.
Comment 5 V Stuart Foote 2019-10-18 13:37:37 UTC
@Mike K, but don't we always install OpenSymbol with LibreOffice core? A user then removing is causing their own grief.

Simply warning them they've broken LibreOffice just papers over a pretty significant shortcoming.

What is really needed would be to implement bug 101174 to allow effective use of fonts other than OpenSymbol, and then provide a fallback mechanism (with a warning if no suitable font is available).
Comment 6 Mike Kaganski 2019-10-18 21:49:12 UTC
(In reply to V Stuart Foote from comment #5)
> @Mike K, but don't we always install OpenSymbol with LibreOffice core? A
> user then removing is causing their own grief.

Is there any hint that a font suddenly appeared among tens other fonts on the system was installed by LibreOffice? Is there any warning when a user decided to cleanup installed fonts that one of them is required for LibreOffice? Is there a guarantee that the problem (visible only when working with formulas) would be spotted shortly, so that user could possibly associate the removal of (s0me) fonts with broken behavior of Math?

> Simply warning them they've broken LibreOffice just papers over a pretty
> significant shortcoming.
> 
> What is really needed would be to implement bug 101174 to allow effective
> use of fonts other than OpenSymbol, and then provide a fallback mechanism
> (with a warning if no suitable font is available).

I don't argue that this is *possibly* a good-to-have thing, but they are independent, and this one is rather low-hanging fruit that doesn't prevent that one from happening once.
Comment 7 Heiko Tietze 2019-10-22 12:25:23 UTC
What if the user has a proprietary alternative installed. When and how often do you want to warn about missing OpenSymbol?
Comment 8 Mike Kaganski 2019-10-22 12:34:43 UTC
(In reply to Heiko Tietze from comment #7)
> What if the user has a proprietary alternative installed. When and how often
> do you want to warn about missing OpenSymbol?

Proprietary alternative of what? OpenSymbol? Or Math?
If the former, then it doesn't matter, because for Math, no proprietary alternative is usable (see tdf#101174).
If the latter, then that doesn't matter, since the proposal (as further clarified in comment 4) is "When we open Math, we must check if a component required for its correct work is present, and warn if not" - so opening Math shows user's intention, and that's when the check and warning should appear (every time, since the component is broken at that point, and no need to disable "broken component" warning).
Comment 9 Regina Henschel 2019-10-22 13:38:22 UTC
The font file is included in the installation set and in case you make an administrative installation, you will get a folder Fonts. But with an ordinary installation the font file is not available. So if the user lost the file (intended or by accident) and wants to reinstall the font, he does not know, where to get it. The fact, that a missing font is the reason for wrong rendered formulas, can be easily found in forums, but not where to get the font.

My proposal is: Do not warn the user, but make the file available in an ordinary installation.
Comment 10 Cor Nouws 2019-10-23 18:24:44 UTC
(In reply to Regina Henschel from comment #9)
> My proposal is: Do not warn the user, but make the file available in an
> ordinary installation.
If you choose this, than a link in the warning is needed.

But IMHO fonts that have a use in the application, should be installed.
Comment 11 Mike Kaganski 2019-10-23 18:31:40 UTC
(In reply to Regina Henschel from comment #9)

Do you mean that we should put the font into the application's directory, and load it when LibreOffice starts (like private font in Windows)? I suppose that would be really good solution actually!
Comment 12 Regina Henschel 2019-10-23 19:34:19 UTC
(In reply to Mike Kaganski from comment #11)
> 
> Do you mean that we should put the font into the application's directory,
Yes.

> and load it when LibreOffice starts (like private font in Windows)?
If that is possible, that would be a solution for the case, the font is not available on the system.

In general I prefer an installation, so that always the most current version is available.
Comment 13 Heiko Tietze 2019-10-24 09:08:01 UTC
We discussed this topic in the design meeting. Since the OpenSymbol font is crucial for Math we should indeed warn when it's not available. But such a warning needs to be actionable and the (red) infobar needs a button "Install". I'm afraid it's not possible to install fonts at the user directory (would make it much easier to handle fonts in an extension way), the proposal to install it with the application is okay.

Mike, do you want to implement it?
Comment 14 Mike Kaganski 2020-01-13 01:43:42 UTC
https://gerrit.libreoffice.org/c/core/+/86649

This is implementing Regina's proposal from comment 9. Since that would simply make the font unconditionally available, possibly no need for a warning (but a review needed first).
Comment 15 Commit Notification 2020-01-14 12:31:42 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/25f4cc12fb59284392914c93a0ae6ad199ecc069

tdf#128226: make OpenSymbol font an internal resource

It will be available in 6.5.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 16 Mike Kaganski 2020-01-14 12:36:34 UTC
So instead of a warning, now the font will be always available after the change mentioned in comment 15. Thanks Regina for the great idea!