1
votes

Looking in manual and searching in sources of docx4J I haven't found the solution to programmatically embed my custom font in output document. (xhtml-docx conversion)

So, I've found some classes which manipulate already embedded fonts in docx (for example during docx - pdf conversion), but can not find how to embed them at the first place.

Maybe there is another library for such task.

(Manual embedding with Microsoft Word is not suitable solution) Thanks.

1

1 Answers

0
votes

Two main steps.

First, add an ObfuscatedFontPart containing your font. You'll need the reverse of the deObfuscate method to do this.

Second, you may need to map your xhtml font to your embedded one