LibreOffice: Certain Bundled Fonts Are Missing in Ubuntu

Hey there,

I noticed that in the standard installation of LibreOffice on Ubuntu 19.04 there are some bundled fonts missing that LibreOffice uses in some of its standard templates. For example, the bundled Impress template “vivid” uses Adobe’s Source Sans Pro (which is openly licensed as OFL 1.1) throughout the whole template. Since Ubuntu does not packages this exact font LibreOffice has to substitute the font and moreover is hinting this only by showcasing the font’s name in italic. Not very user friendly.

This is true for many of the bundled Impress templates and clearly not optimal. Users are most often not aware of the fact that the font displayed is not the font indicated in the menu. And creators of LibreOffice templates cannot rely on LibreOffice’s bundled fonts for making sure that their template is correctly displayed on all three platforms (Linux, Mac Os X, Windows). I would therefore suggest that Ubuntu packages exactly the same fonts as the Document Foundation foresees for their binaries (or at least the fonts used in templates shipped by default): https://wiki.documentfoundation.org/Fonts

2 Likes

Good catch. Thanks for bringing this to our attention. It’s on my todo. Will let you know once I’ve gotten around to it.

4 Likes

Alright, so really there are only two fonts broken, but across 6 templates:

Noto Sans:

  • Modern Business Letter (sans-serif)
  • Lush Green
  • Impress

Source Sans Pro:

  • Alizarin
  • Midnightblue
  • Vivid

Noto Sans was a weird one as these fonts are actually installed with LibreOffice. This turned out to be a bug in the templates’ content and styles xmls:

font-family="'Noto Sans Regular'" instead of font-family="'Noto Sans'" in a couple of places.

I’ve prepared a patch for this to be released in 6.3.0 later this week.

As for Source Sans Pro, the ideal fix for this, as you say, is to package the fonts separately and install them alongside LibreOffice. In the meantime though, I’ve prepared a patch to simply replace the use of Source Sans Pro with Noto Sans in these templates (also to be released in 6.3.0).

2 Likes

Thank you! This is awesome!

In the long term, it would be even better if we could have these issues fixed in a more upstream fashion by packaging the Source Pro font family and fixing the Noto-template-bug upstream. With the latter I suppose you have provided a patch for the Ubuntu package of LibreOffice 6.3.0, am I right?

Anyways, thanks for the quick fix. I really appreciate it.

Right, these patches have been applied only to the Ubuntu packages at this point. Partly because I’ve not yet assessed how broken this is upstream, and partly because feature freeze for Eoan is around the corner.

I will need to do more testing against upstream’s own packages, as well as on Debian to determine what proposals are needed there.

4 Likes

I just found another related issue:

Ubuntu doesn’t provide packages for the Caladea and Carlito fonts. These are metrically compatible fonts with Microsoft’s default fonts Cambria and Calibri and can therefore be used as direct substitutes without changing the layout/appearance of a document. With other words, they are needed to provide for compatibility with modern MS Office files (I believe starting with MS Office 2007 Cambria and Calibri have been the default fonts). LibreOffice will automatically substitute Cambria and Calibri with Caladea and Carlito as long as those fonts are available on the system.

Moreover, Caladea and Carlito are used as default fonts in the “modern”-template which is shipped by default with LibreOffice. Thus, this template is broken as well at the moment.

I think the proper solution to these font-related issues would be to make sure that all fonts packaged with LibreOffice by default (see link in my first post in this thread) are also available on Ubuntu. I would suggest to make this a goal for the Ubuntu 20.04 LTS release cycle.

Edit: I stand corrected. There are packages for Carlito and Caladea in Ubuntu’s universe repository but somehow LibreOffice can’t use them with the “modern”-template. Might be - again - a problem with the template itself or maybe the LibreOffice package doesn’t depend on those two fonts so that they are not pulled from the repository. Not sure where the root of the problem lies…

1 Like

I just updated to Ubuntu 19.10. All mentioned templates are still broken! Impress’ Midnight Blue template, for example, now indeed makes use of Noto but LibreOffice still indicates that the font is missing.

@marco, indeed I had forgotten to add fonts-noto-extra to the Recommends for LibreOffice. I will put this on my todo for 6.3.4, thanks. In the meantime please apt install fonts-noto-extra to fix your broken templates.

2 Likes

In the future, please report template-related issues directly upstream, so that they can be fixed more promptly: bugs.documentfoundation.org