We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

How font substitution works

Hi,

We are going through the way font substitution works while converting to PDF using Aspose, and more particularly when Aspose could not found the font, how it chooses any other font suitable for the scenario. In case the default is not set, in java docs, it is written that Aspose tries to find the suitable font that could be used.

Can we get some more info on how Aspose tries to find the suitable font? I mean how Aspose decides the font to be used in some particular situation.

This message was posted using Email2Forum by Muhammad Ijaz.

Hi Praneeth,

Thanks for your inquiry. Please read the following documentation link for your kind reference.
https://docs.aspose.com/words/java/using-truetype-fonts/
https://docs.aspose.com/words/java/manipulate-and-substitute-truetype-fonts/

If Aspose.Words is unable to locate the font defined under FontSettings.DefaultFontName, it attempts to select the most suitable font from all of the available fonts.

I have logged a ticket as WORDSNET-10124 in our issue tracking system about choosing suitable fonts from all available fonts while rendering fixed file formats. We will update you via this forum thread once there is any update available on this.

Hi Praneeth,

Thanks for your patience. I have received response from our development team about WORDSNET-10124.* Currently if the FontSettings.DefaultFontName is not available, Aspose.Words simply takes any font from the font sources.

Moreover, we had already logged a ticket as WORDSNET-4316 in our issue tracking system to improve font substitution rules. We will update you via this forum thread once WORDSNET-4316 is available. Currently, this issue is postponed till a later date due to some other important issues and new features.

We apologize for your inconvenience.

Just to let you know, that Javadocs says that Aspose tries to find suitable font available which could be used as a replacement of font not found. We assumed Aspose is having some algorithm to find the property of font (whether truetype, outliners, serif, sans-serif etc), and tries to find such font from the system. But clearly it is not the case and most of the time it used “Liberation Serif” named font (in mostly all cases).

It even tries to replace Wingdings and other symbolic fonts with this font which could not be rendered. We really having hard time for the fonts not being rendered properly in the PDF.

The ideal solution is to embed the fonts in the word document itself but Aspose is not supporting that option too. So, please improve your font substitution algorithm asap.

Thanks.

Hi Praneeth,

Thanks for your inquiry. We will update you via this forum thread once WORDSNET-4316 (improve font substitution rules) is available. We apologize for your inconvenience.

PraneethS:

The ideal solution is to embed the fonts in the word document itself but Aspose is not supporting that option too.

Aspose.Words first tries to get the font from font sources and then tries to use the embedded font.

Could you please share your document (containing the embedded font) here for testing? I will investigate the issue on my side and provide you more information.

Hi Tahir,
Please assume we’re not embedding the fonts manually. When I said, "The ideal solution is to embed the fonts in the word document itself ", I meant to embed the fonts (which are used in the document) to the document itself, using Aspose.

Do Aspose has the way for the same?

Thanks.

Hi Praneeth,

Thanks for your inquiry. Unfortunately,
Aspose.Words does not support the requested feature (embed fonts in Word document) at the moment. We had
already logged this feature request as WORDSNET-3827 in our issue tracking system. You will be notified via this forum thread once this feature is available.

We apologize for your inconvenience.

The issues you have found earlier (filed as WORDSNET-3827) have been fixed in this .NET update and this Java update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.
(30)

The issues you have found earlier (filed as WORDSNET-4316) have been fixed in this Aspose.Words for .NET 17.3.0 update and this Aspose.Words for Java 17.3.0 update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.
(6)