Bug 120131 - Include font substitutions for fonts commonly used in MS Office for which we bundle alternatives
Summary: Include font substitutions for fonts commonly used in MS Office for which we ...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
6.0.4.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: needsDevEval
Depends on:
Blocks: Font-Substitution Fonts-Locale Languages
  Show dependency treegraph
 
Reported: 2018-09-26 12:10 UTC by Eyal Rozenberg
Modified: 2024-09-12 20:04 UTC (History)
3 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 Eyal Rozenberg 2018-09-26 12:10:04 UTC
One of the complaints I hear from people whom I suggest LibreOffice is, that when they open in LO an existing document written on another platform, the fonts look funny.

I mainly get this complaint for people who open a document written on Windows and opened on Linux, with Hebrew, but I'm sure other people get this with other language and platform combinations.

LibreOffice has a font substitution mechanism already; and it seems to apply "recessively", i.e. only perform a substitution if the font is actually missing.

I therefore propose that LO include a default substitution table for some or all of the fonts used in Microsoft Office in different languages, (1) where LO bundles fonts that can serve as such substitutes.

With my more specific motivating example being Hebrew, I suggest the following substitutions:

David -> David CLM
Arial -> Arial Unicode MS
Times New Roman -> Liberation Serif
Frank Ruehl -> Frank Ruehl CLM

these are often used in MS Office on Windows for Hebrew text (see bug 113538). I'm sure others could be added for Mac OS. Similar substitutions would be relevant for other languages as well, I believe.

Be reminded that the user can turn off substitution entirely with a few clicks or edit the table to his/her hearts' content.
Comment 1 Caolán McNamara 2018-10-24 09:26:19 UTC
we have this feature, see...

officecfg/registry/data/org/openoffice/VCL.xcu

if we search there for "liberationserif" there is an entry like this...

<node oor:name="liberationserif" oor:op="replace">
  <prop oor:name="SubstFonts">
    <value>thorndaleamt;thorndale;timesnewroman;nimbusromanno9l;times;timesroman;newyork;timmons;lucidaserif;lucidabright;roman;nimbusromanno9;bookman;itcbookman;garamond;garamondmt;palatino</value>
  </prop>
  <prop oor:name="SubstFontsMS">
    <value>Times New Roman</value>
  </prop>
  <prop oor:name="SubstFontsPS">
    <value>Times</value>
  </prop>
  <prop oor:name="SubstFontsHTML">
    <value>serif</value>
  </prop>
  <prop oor:name="FontWeight">
    <value>Normal</value>
  </prop>
  <prop oor:name="FontWidth">
    <value>Normal</value>
  </prop>
  <prop oor:name="FontType">
    <value>Default,Standard,Normal,Serif</value>
  </prop>
</node>

In this example the SubstFontsMS entry is the fallback font name that we set in the MSOffice file format to tell MSOffice what font to use in place of Liberation Serif if it is not available, Times New Roman in this case.

In the other direction, for timesnewroman

<node oor:name="timesnewroman" oor:op="replace">
  <prop oor:name="SubstFonts">
    <value>thorndaleamt;thorndale;liberationserif;...
  </prop>
...
</node>

when not available LibreOffice will try the options listed under SubstFonts in order (though when fontconfig is available on a platform fontconfig is consulted instead)

What we *don't* have in here is entries for two of the font pairs you mention, David/David CLM and Frank Ruehl/Frank Ruehl CLM.

So, assuming the feature is working correctly, I think the best thing to try first is to add entries for those two missing font pairs to VCL.xcu
Comment 2 Eyal Rozenberg 2018-10-24 13:00:31 UTC
(In reply to Caolán McNamara from comment #1)
> we have this feature, see...

I did acknowledge that. But like you said, LO currently only has substitutions for fonts it uses by default. 

> So, assuming the feature is working correctly.

It is

> I think the best thing to try first is to add entries for those two missing font pairs to VCL.xcu

I've used the substitutions dialog to add the specific substitutions for Hebrew, and they work fine. Please add them by default (and perhaps also substitutions for MS-Word defaults in other languages).
Comment 3 QA Administrators 2019-10-25 02:39:59 UTC Comment hidden (obsolete)
Comment 4 Eyal Rozenberg 2019-10-25 06:42:00 UTC
Nothing has changed for LO 6.3 - or 6.4 AFAICT.
Comment 5 QA Administrators 2019-10-26 02:09:13 UTC Comment hidden (obsolete)
Comment 6 Eyal Rozenberg 2019-10-26 07:00:37 UTC
Why am I getting this automated close-threat twice?

Fonts are still not added to version:

Version: 6.3.2.2
Build ID: 1:6.3.2-1
CPU threads: 4; OS: Linux 5.2; UI render: default; VCL: gtk3; 
Locale: he-IL (en_IL); UI-Language: en-US

as far as I can tell.
Comment 7 QA Administrators 2021-10-26 04:43:46 UTC Comment hidden (obsolete)
Comment 8 Eyal Rozenberg 2021-10-26 22:39:10 UTC
I don't know that this has changed, as of 7.2
Comment 9 Eyal Rozenberg 2021-10-27 20:57:22 UTC
Liberation Serif is not substituted for Times New Roman.
David CLM is not substituted for David
Frank Ruehl CLM is not substituted for Frank Ruehl

... with:

Version: 7.2.0.1 / LibreOffice Community
Build ID: 32efc3b7f3a71cfa6a7fa3f6c208333df48656cc
CPU threads: 4; OS: Linux 5.10; UI render: default; VCL: gtk3
Locale: en-US (en_IL); UI: en-US
Comment 10 Timur 2022-07-02 21:10:24 UTC
There is a bug for this and David and Frank, for which this one was confirmed, may be added there, explaining the replacement and font licences.

*** This bug has been marked as a duplicate of bug 64509 ***
Comment 11 Eyal Rozenberg 2022-07-02 22:17:42 UTC
Timur, stop closing people's bugs - especially NEW ones - in non-trivial cases without discussing it with them first.

To the point: I will bring this up on bug 64509. If the discussion there results in consensus about adding the substitutions here, then we could possibly close this bug as a dupe. For now, the bugs are related.
Comment 12 Eyal Rozenberg 2023-02-18 21:31:51 UTC
This should not be difficult, since it's just adding some table entries.

As for the discussion on bug 64509 - it did not progress to an adoption of the suggestions here.