Convert unsupported font to given installed font

Hello,

Here is my basic workflow for a feature of my project:

  1. Upload pptx from local Windows machine to a Fedora server (done)
  2. Split that file into single-page files. (done)
  3. Convert each page to image (stuck here now).
  4. Return the image (done)

Now that, Windows contains some fonts that are either 1. not installed on my server or 2. not supported by Linux after all, so sometimes some words will be converted to Fedora-installed font on my server, which could change word’s space (since some fonts look bigger/wider than other even they have same font size) that may push the word to a new line and overlap with other content on the page.

Therefore, I wonder if there is anyway to force LibreOffice to read unsupported fonts as a font of my choice(ideally font size as well), no matter what font it originally used?

I have done my research around, it turns out potentially possible with a GUI, which is not available for my server and makes the problem more complex.

Any suggestions?

The font substitution table can be configured in Tools>Options, LO>Fonts. However this is GUI and you seem to hint you can access the LO machine only in CLI mode.

Is any desktop installed on the Fedora server? (by the way which Fedoira version?) If this is the case, login to the serveur with:

ssh -X user@host

The -X option requests remote GUI session. Once the session is active, you can open LO as a GUI application with command:

soffice --impress &

LO executes on the server but windows display on your local computer. Note that performance may be poor because it is limited by your LAN and internet bandwidth.

1 Like

my server is on a cloud that I cannot visit on local machine. I can only access it through cloud where only cmd is available.

export / convert to pdf ?

LO Impress how to replace all fonts

export to image

Is it possible to replace all fonts without a GUI?

from the link given above, seems yes with macros.

hmm idk, I just double checked that post, but it used GUI too, can you actually load a macro without a GUI?

sure.

with some gory details sometimes of course :neutral_face:
Macro for server side image generation of spreadsheet

but the font substitution sounds safe enough …

User-made changes to the font substitution table are stored in registrymodifications.xcu and can (probably) be generated by a macro.

Both of these extensions might do the trick:

and