Unable to embed custom font (PUA/EUDC) in PDF on Azure AppService (Windows)

I am trying to generate a PDF from an Excel (.xlsx) file via command line on Azure AppService (Windows) environment.
The Excel file uses custom characters defined in the Private Use Area (PUA) with a specific custom font explicitly set within Excel.

Since OS-level font installation is not permitted on AppService, I followed the instructions at the following URL and placed the custom TrueType font under share\fonts\truetype within LibreOffice Portable:

The version of soffice.com is as follows:

.\soffice.com --version
LibreOffice 7.6.7.2

When I test this approach on a local Windows 10 machine, the font is correctly embedded in the PDF output and the custom characters display properly.

However, when performing the PDF conversion in the same manner on AppService, a different font (ming-lt-hkscs-uni-h) is embedded instead of the specified custom font, resulting in different characters being displayed in the PDF.

An example of the command actually run on AppService is as follows:

C:\home\LibreOfficePortable\App\libreoffice\program\soffice.com ^
  --headless --language=ja --convert-to pdf ^
  --outdir "C:\home\test" "C:\home\test\sample.xlsx"

Questions:

  1. Is there a reliable way to ensure that fonts placed under share/fonts/truetype are embedded when converting with soffice.com via the command line?
  2. How can I prevent unintended fallback fonts (such as ming-lt-hkscs-uni-h) from being embedded instead?

If anyone has experience or advice on this issue, I would greatly appreciate your help.
Thank you very much in advance.

I would first check, if this setting is correct: when you open the Excel file locally in Calc, is the font name set in the respective cells displayed normally in the Font Name box; or is it italicized there - which would indicate “font is absent on this system, and a substitute is used”?

The idea is, that if that is the case (which could be e.g. when the font name is similar, but not identical), it could be possible, that by chance, the font that you provided in share/fonts/truetype gets used as substitute; but on another system, another font could be picked.

Thank you very much for your response. First of all, let me answer your question.

When I opened the file in Calc, the font displayed in the cells was different from the one specified in Excel, it showed as Noto Sans JP.
However, the private use area (PUA) characters were displayed correctly on my local machine, which I assume is because Calc used the font I placed in the share/fonts/truetype directory.

That said, I’ve realized that there are actually two separate issues involved here:

  1. The font name changes when opening the file in Calc from Excel.

  2. Even when I explicitly set the desired font in Calc, a different font is embedded in the resulting PDF. This is the core issue.

The main issue I’d like to resolve is (2).
To clarify: Even when I explicitly specify the EUDC font in Calc, the PDF output still embeds ming-lt-hkscs-uni-h instead.

It seems that the EUDC font placed under share/fonts/truetype is not being embedded as expected when generating PDFs in the AppService environment.

I’m continuing to test various configurations, but it’s still unclear whether the problem lies with restrictions in AppService or missing configurations in LibreOffice Portable.

If you have any suggestions or ideas about further directions to investigate, I’d greatly appreciate your help.
Thank you very much for your time and support.