A generated PDF, a server side screenshot or a chart comes out with odd letter shapes. Usually the font you asked for isn’t there and something else took its place without telling you.
Ask fontconfig what it would hand out:
fc-match Helvetica
The answer names the file and the family that will be used, for example:
LiberationSans-Regular.ttf: "Liberation Sans" "Regular"
It also works for the generic names, so you can see what monospace or sans-serif mean on this machine:
fc-match monospace
To see the whole fallback order, sort the matches:
fc-match -s monospace | head
I run this inside the container or on the server that does the rendering, since my own desktop has a completely different set of fonts.
Note that fc-match always answers with something, even for a name that doesn’t exist. Don’t read a reply as proof the font is installed. Compare the family in the output with what you asked for. After adding fonts, fc-cache -f refreshes the cache, and a running service may need a restart before it notices. Some programs ship their own font handling and ignore fontconfig altogether.
Further reading: fontconfig user documentation