Free Support Forum -

Using embedded font for Aspose.Words.Drawing.Shape object

Is there a way to specify a PrivateFontCollection for a Shape object?

We have an application that uses fonts that are embedded as resources. When converting a docx file to PDF or EMF, some of the WordArt is encapsulated in a Shape object. The Shape.TextPath.FontFamily property allows us to set the name of the font family to use; but if the font isn’t installed on the system, Arial is used. Is there a way to set the font collection to use with either the Shape.Font or Shape.TextPath.* properties?


Hi Jonathan,

Thanks for your inquiry. You can use FontSettings.SetFontSubstitues to set replacements for missing fonts and also use default font as described here set default font which will be used for missing fonts if no substitutes are specified.

You may use FontSettings.SetFontSubstitutes method to override substitute (alternative) font names for given original font name. Hope this answers your query. Please let us know if you have any more queries.

Thanks for the information. Updating to a newer version of Aspose.Words resolves the issue.

Hi Jonathan,

Thanks for your feedback. Please feel free to ask if you have any question about Aspose.Words, we will be happy to help you.