How to provide font substitution list when using --convert-to pdf in headless mode (without GUI or modifying registrymodifications.xcu)?

I am using the --headless --convert-to pdf command line option in LibreOffice and not using the GUI at all.

My requirement is to provide a font substitution list for fonts that are not available on Linux, or to map commercial fonts to equivalent open-source alternatives.

I know that:

  • This can be configured through Tools → Options → Fonts in the GUI.
  • It is also possible to edit the registrymodifications.xcu file, but I would like to avoid this, as modifying this file directly could potentially corrupt the user profile.

Question:
Is there any alternative way to define or provide a font replacement table when using only the command-line --convert-to pdf (headless) option, without relying on the GUI or modifying registrymodifications.xcu?

No. Modify registrymodifications.xcu.

Use a dedicated user profile. In general, using the default user profile for command line operations is a bit odd, especially when such operations are important part of the workflow. Every change you make in your main profile may affect your command line pipeline - do you really expect that? Your command line operations should use something configured separately. See -env:UserInstallation in help.

2 Likes