Bug 91004 - 'Tms Rmn' font should be substituted for Times New Roman or Liberation Serif
Summary: 'Tms Rmn' font should be substituted for Times New Roman or Liberation Serif
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Font-Substitution
  Show dependency treegraph
 
Reported: 2015-05-02 01:00 UTC by Yousuf Philips (jay) (retired)
Modified: 2018-06-17 15:34 UTC (History)
5 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 Yousuf Philips (jay) (retired) 2015-05-02 01:00:59 UTC
Steps:
1) Open http://www.exinfm.com/excel%20files/ratings.xls
2) Notice that the font listed in the font drop down is 'Tms Rmn' and that is is being substituted as its in italics
3) Notice that the substituted font is not a serif font like Times New Roman or Liberation Serif.

Version: 5.0.0.0.alpha1+
Build ID: 59adad74084e9281887e3f78a225794f37b784d7
TinderBox: Linux-rpm_deb-x86@45-TDF, Branch:master, Time: 2015-04-29_12:34:23
Comment 1 Yousuf Philips (jay) (retired) 2015-05-02 02:00:00 UTC
Came across this file which has 'helv' in its font list, which i'm assuming its a short form of helvetica.

http://www.exinfm.com/excel%20files/fcashflow.xls
Comment 2 raal 2015-05-02 06:52:28 UTC
I can confirm with Version: 5.0.0.0.alpha1+
Build ID: 59adad74084e9281887e3f78a225794f37b784d7
TinderBox: Linux-rpm_deb-x86_64@46-TDF, Branch:master, Time: 2015-04-29_12:40:39
Comment 3 Adolfo Jayme Barrientos 2015-05-02 10:30:43 UTC
Isn’t this the kind of stuff managed by fontconfig? I think the alias should be added there. But… is it so frequently found?

> Came across this file which has 'helv' in its font list

That was an old* name used by Microsoft for its Microsoft Sans Serif font, not Helvetica.

* Old, as in the times of Windows 3.1.
Comment 4 Yousuf Philips (jay) (retired) 2015-05-02 12:34:09 UTC
(In reply to Adolfo Jayme from comment #3)
> Isn’t this the kind of stuff managed by fontconfig? I think the alias should
> be added there. But… is it so frequently found?

Does LO depend on fontconfig for font substitutions? The excel file was created around 2000.

> That was an old* name used by Microsoft for its Microsoft Sans Serif font,
> not Helvetica.

So that means it should be Times New Roman then.
Comment 5 m_a_riosv 2015-09-04 00:52:33 UTC
I'm agree with Adolfo, I think the Menu/Tools/Options/LibreOffice/Fonst - Replacement table, it's to solve situations like this, between others.

At least it works for me, with the sample file. Which implies there is an specific option to solve corner cases like this one.

BTW, how LibreOffice could know what font use to make the substitution, if the font is not installed, or it is embedded with the xls file?

For me not a bug. Please if you are not agree reopen it.
Comment 6 Yousuf Philips (jay) (retired) 2015-09-04 05:18:11 UTC
(In reply to m.a.riosv from comment #5)
> I'm agree with Adolfo, I think the Menu/Tools/Options/LibreOffice/Fonst -
> Replacement table, it's to solve situations like this, between others.

Most users dont open the options dialog.

> At least it works for me, with the sample file. Which implies there is an
> specific option to solve corner cases like this one.

Yes i tried it on windows and the system based substitute worked, so the substituted font was a serif font. So i'm assuming linux and mac would only be affected by this issue.

> BTW, how LibreOffice could know what font use to make the substitution, if
> the font is not installed, or it is embedded with the xls file?

I'm assuming libreoffice has a substitution array, which is how we substitute Times New Roman for Liberation Serif, as that wouldnt be in the OS substitution list and isnt in the options dialog.

> For me not a bug. Please if you are not agree reopen it.

I consider this a compatibility/interoperability issue, though not a major one, but their are limits to how much LO should rely on the OS substitution list.

@Maxim, @Caolan: Any thoughts.
Comment 7 Caolán McNamara 2015-09-04 10:20:38 UTC
https://support.microsoft.com/en-us/kb/82860

"TmsRmn and Helv ... We still have the exact same fonts, but now under the names MS Sans Serif and MS Serif"

https://support.microsoft.com/en-us/kb/68536

"Font Family     Bitstream    Canon    Adobe        HP
-----------     ---------    -----    -----        --

Swiss (Helv)    Swiss        Swiss    Helvetica    Universe
Roman (Tms Rmn) Dutch        Dutch    Times Roman  CG Times"

and it appears we have these two listed in our VCL.xcu

http://opengrok.libreoffice.org/xref/core/officecfg/registry/data/org/openoffice/VCL.xcu#7349

so we should be covered for the pure-libreoffice side of things.

But we generally use fontconfig on Linux rather than those tables. fc-match "TmsRmn" and fc-match "Helv" just return the default font for me so there's no particular fontconfig smarts for those fonts apparently.

I guess ideally fontconfig has a mapping for Helv->"MS Serif" and "TmsRmn->MS Sans Serif" and then further fallbacks for those to the helvetica replacements and the "times roman" -> "times new roman" replacements
Comment 8 Caolán McNamara 2015-09-04 10:45:01 UTC
Lets see if the fedora fontconfig maintainer has any thoughts on that https://bugzilla.redhat.com/show_bug.cgi?id=1260061
Comment 9 Yousuf Philips (jay) (retired) 2015-09-04 13:13:04 UTC
Have also submitted it to the fontconfig mailing list - http://lists.freedesktop.org/archives/fontconfig/2015-September/005557.html
Comment 10 Felix Miata 2016-09-21 04:33:20 UTC
FWIW, this is from a 24/7 eComStation 1.1 installation created about a dozen years ago:

Directory of F:\PSFONTS
...
11-22-99 11:22a         6,793      0 a---  HELV.OFM
11-22-99 11:23a       120,578      0 a---  HELV.PFB
11-22-99 11:22a         6,785      0 a---  HELVB.OFM
11-22-99 11:23a       123,085      0 a---  HELVB.PFB
11-22-99 11:22a         6,787      0 a---  HELVBI.OFM
11-22-99 11:23a       124,245      0 a---  HELVBI.PFB
11-22-99 11:22a         6,772      0 a---  HELVI.OFM
11-22-99 11:24a       123,355      0 a---  HELVI.PFB
11-22-99 11:22a         6,809      0 a---  TNR.OFM
11-22-99 11:24a       145,785      0 a---  TNR.PFB
11-22-99 11:22a         6,825      0 a---  TNRB.OFM
11-22-99 11:24a       148,564      0 a---  TNRB.PFB
11-22-99 11:22a         6,839      0 a---  TNRBI.OFM
11-22-99 11:24a       159,652      0 a---  TNRBI.PFB
11-22-99 11:22a         6,830      0 a---  TNRI.OFM
11-22-99 11:24a       157,010      0 a---  TNRI.PFB
11-22-99 12:04p         1,352      0 a---  tnrmt30.cmb
11-22-99 12:00p    21,665,952      0 a---  tnrwt_j.ttf
...

IOW, files with Helv or Tms Rmn could have come from OS/2 or eComStation users, not just Windows users.

cf. http://fm.no-ip.com/Auth/Font/fonts-face-index-os2.html
Comment 11 Volga 2017-11-23 10:55:18 UTC
In MS Windows, 'Tms Rmn' font is substituted for MS Serif font, which is specified in a Windows Registery path HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontSubstitutes.
Comment 12 Volga 2017-11-23 11:15:04 UTC
(In reply to Volga from comment #11)
> In MS Windows, 'Tms Rmn' font is substituted for MS Serif font, which is
> specified in a Windows Registery path
> HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
> NT\CurrentVersion\FontSubstitutes.

We can try to add a functionality to make it works as replacement table on Windows. (Bug 113007)
Comment 13 Volga 2018-06-13 03:04:27 UTC
Does macOS and Linux distributions having system-wide solutions to replace 'Tms Rmn' to other font? If so LibreOffice need to handle them.
Comment 14 Felix Miata 2018-06-13 03:18:08 UTC
(In reply to Volga from comment #13)
> Does macOS and Linux distributions having system-wide solutions to replace
> 'Tms Rmn' to other font?

I do not find the string 'Tms Rmn' anywhere in /etc/fonts/ in openSUSE 42.3.
Comment 15 Volga 2018-06-17 15:34:22 UTC
(In reply to Felix Miata from comment #14)
> (In reply to Volga from comment #13)
> > Does macOS and Linux distributions having system-wide solutions to replace
> > 'Tms Rmn' to other font?
> 
> I do not find the string 'Tms Rmn' anywhere in /etc/fonts/ in openSUSE 42.3.
Oh I mean whether Linux distributions has similar font substitution as above Windows registry.