Bug Hunting Session
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:
Depends on:
Blocks: RTL-CTL Fonts-Locale
  Show dependency treegraph
 
Reported: 2018-09-26 12:10 UTC by Eyal Rozenberg
Modified: 2018-10-24 13:00 UTC (History)
1 user (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).