by jason » Fri Apr 08, 2022 5:12 pm
You'll need to create a TrueTypeFontPart or an ObfuscatedFontPart. Use setBinaryData to specify the ttf content.
Then add this to your docx: if you look at how Word does it, this will be a rel of your FontTablePart. So fontTablePart.addTargetPart
Typically you would also add a w:font entry in your font table part which describes the font. To work out what to put there, use Frutiger in a docx in Word then look at the resulting part.
Of course, to see any results you'll need to specify Frutiger on one or more runs (or use it as doc default or in a style).