Need to add Custom font in docx file

Need to add my organisation customised font to docx file.
Issue:
Custom font is missing in user system. So default font(Times new roman) rendering is happening in user laptop. But it is supposed to be custom font.

Thanks,
Hari

@harivarma,

Thanks for your inquiry. Following code example saves document with embedded TrueType fonts. System fonts are not included. Hope this helps you.

If you still face problem, please ZIP and attach your input Word document and custom fonts that you want to embed here for testing. We will then provide you more information about your query.

Document doc = new Document("in.docx");
FontInfoCollection fontInfos = doc.FontInfos;
 
fontInfos.EmbedTrueTypeFonts = true;
fontInfos.EmbedSystemFonts = false;
fontInfos.SaveSubsetFonts = false;
doc.Save("out.docx");