Have you been able to get this to work, because we are currently running into the same issue. It seems that the custom fonts are not applied, even when adding the embedding-mode=”full” part. are the triplet names required to equal the actual font names, or can this just be anything as long as the name matches?
Edit: Seems i was to quick, i found out why it was not working for me, the renderer seems to lower case your triplet names, but only runtime. e.g. if you use font-family:Arial in your document template it will search for a font-triplet with the name arial. Or in my case i was looking for Klavika RG, setting the loglevels to trace gave me the following warning:
Font "klavika rg,normal,400" not found. Substituting with "any,normal,400".
To fix this i simply changed the font-triplet name to lower case in my fop.xconf. While i am not sure on what the documentation of fop states of using triplet names capital letters, it feels kinda buggy to lower-case just the input.
Thanks, after spending lots of time R&D to make PDF display Chinese font, instead of ‘###’.
This is the result in PDF:
Additional Note:
Changing the Default Log Level from ‘Info’ → ‘Trace’ (allow me to understand regarding how Mendix read the font-triplet name (eg. lower-case “arial unicode ms”, instead of “Arial Unicode MS”)
fyi, you will need to copy the "original fop.xconf”, and paste into your resource.
→ “yourproject-main\resource\”
File path: ...yourproject-main\resources\fop.xconf
<font kerning="yes" embed-url="arial-unicode-ms.ttf" embedding-mode="full">
<font-triplet name="arial unicode ms" style="normal" weight="normal"/>
</font>
Overview on how I apply the “arial unicode ms” to diplay Chinese word
you need to download the “Arial Unicode MS” from the internet, and then rename the file to “arial-unicode-ms.ttf” (easier to use this name)
I can confirm that embedding fonts used to work in the past. I doubt that Mendix made any changes to this functionality recently.
You can find a fully configured example using “arial” in this blog post
https://www.notion.so/gajduk/Generating-PDF-A-compliant-documents-01ff7b8462e0404eac21b178784cae7d
Maybe you can compare the two and see what is the difference? a
I followed the documentation, but the key to get this working seems to be in the embedding-mode attribute as also stated in the blog post.
<font kerning="yes" embed-url="arial.ttf" embedding-mode="full">
<font-triplet name="arial" style="normal" weight="normal"/>
<font-triplet name="arialMT" style="normal" weight="normal"/>
</font>