Replacing Microsoft Fonts via fontconfig utility for Libre office

Hi,

I’m trying to map the following Microsoft fonts to improve rendering fidelity on Linux:

  • Arimo → matches Arial
  • Tinos → matches Times New Roman
  • Cousine → matches Lucida Console
  • Carlito → matches Calibri
  • Caladea → matches Cambria

I’m attempting to achieve this mapping using the Fontconfig utility in Linux — not through the LibreOffice GUI font replacement table or the registrymodifications.xcu file.

I have configured the above mappings in Fontconfig, except for Calibri and Cambria, since Carlito and Caladea are already bundled with LibreOffice.

However, when converting a sample DOCX file to PDF using LibreOffice:

  • Lucida Console is correctly replaced by Cousine (as expected),
  • but Arial and Times New Roman are not replaced with my Fontconfig mappings.
    Instead, Arial is substituted with Liberation Sans, and Times New Roman with Liberation Serif.

Below is my current understanding of how LibreOffice handles font substitution order, which is why I’m trying to manage this through Fontconfig.

  • LibreOffice first applies its internal substitution rules (from registrymodifications.xcu or GUI settings).
  • If no such rule exists, fontconfig selects the closest available system font.
  • If nothing suitable is found, LibreOffice falls back to its bundled fonts, and finally to generic defaults (sans-serif, serif, monospace).

How can I correctly map Arial to Arimo and Times New Roman to Tinos? via fontconfig

You can’t. We do use our internal “known-metrically-compatible” mapping first.

1 Like

Would it be possible to remove Liberation Sans from the OS to force another selection?

1 Like

Good idea - it would work.

@Wanderer Just to confirm,
I have Liberation Sans at two locations /usr/share/fonts and /opt/libreoffice25.8/share/fonts/truetype
Deleting at both the locations is working for another selection. Deleting only one of them is not sufficient, Libre office still using it from another location.