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

Free Support Forum - aspose.com

All fonts not found on RHEL have been replaced to 'Abyssinica SIL' font

Hi Support,

Looks like RPE/Aspose does not substitute another “best matching” font when the set font family is not found. We can see that all fonts are replaced by same ‘Abyssinica SIL’ font, though there are several fonts available in RHEL.


We get the below log:
CRRPE1064I Finalizing document generation. Writing output files…
CRRPE3555W PDF warning: Font ‘lucida sans unicode’ has not been found. Using ‘Abyssinica SIL’ font instead.
CRRPE3555W PDF warning: Table column widths may need to be calculated. Rendered column widths could differ.
At Table 3, Section 1
CRRPE3555W PDF warning: Font ‘georgia’ has not been found. Using ‘Abyssinica SIL’ font instead.
CRRPE3555W PDF warning: Table column widths may need to be calculated. Rendered column widths could differ.
At Table 2, Section 1
CRRPE3555W PDF warning: Table column widths may need to be calculated. Rendered column widths could differ.
At Table 1, Section 1
CRRPE3555W PDF warning: Font ‘courier new’ has not been found. Using ‘Abyssinica SIL’ font instead.
CRRPE3555W PDF warning: Font ‘tahoma’ has not been found. Using ‘Abyssinica SIL’ font instead.
CRRPE3555W PDF warning: Font ‘comic sans ms’ has not been found. Using ‘Abyssinica SIL’ font instead.
CRRPE3555W PDF warning: Font ‘Times New Roman’ has not been found. Using ‘Abyssinica SIL’ font instead.
CRRPE3555W PDF warning: Font ‘verdana’ has not been found. Using ‘Abyssinica SIL’ font instead.
CRRPE1064I Document generation finished in 8 seconds.
CRRPE1022I Process completed in 8.365 seconds.

Please comment on it.

Thanks & regards.
Vincent

Hi
Vincent,


Thanks for your inquiry and sorry for the delayed response.

Yes, this is correct i.e. currently if Aspose.Words cannot find a font with the exact name match, it attempts to select the most suitable font from all of the available fonts as a substitution. However, we’re glad to inform you that recently we’ve implemented a functionality where users will have the freedom to provide a substitution font of their choice to the rendering engine. This feature will be available in the next version of Aspose.Words i.e. 11.1.0 and which is planned to be released by the end of this month. Your request has been linked to this feature and you will be notified as soon as it is available.

Please let us know if you need more information, we are always glad to help you.

Best Regards,

But I did not understand why all not found fonts were replaced by the same font “Abyssinica SIL”. I don’t think these different fonts are all matched with “abyssinica SIL”. We expect different fonts can be replaced by different best matched fonts. Please clarify.

For the new feature can allow users themselft to select font subsitition, I wonder how to use this feature?

Thanks & regards.
Vincent

Hi

Thanks for your request. If some font used in the document is not installed on the PC where you are performing conversion to PDF. Aspose.Words uses an alternative font. Aspose.Words selects the fonts according to the following process:

a. Aspose.Words tries to find the required font among the fonts embedded in the original document. Some document formats such as DOCX can contain embedded fonts.

b. Next, Aspose.Words tries to find a font on the file system with an exact font name match.

c. If Aspose.Words cannot find a font with the exact name match, Aspose.Words attempts to select the most suitable font from all of the available fonts.

d. Finally, if Aspose.Words cannot find any fonts on the file system, it renders the document using the free Gentium font that is embedded into the Aspose.Words assembly.

Best regards,

We have set 6 different fonts name to one document:

Liberation Sans
Arial Unicode MS
Liberation Serif
Liberation Mono
Comic Sans MS
Times New Roman

Run the document generation on both RHEL and Windows, we get different logs:

doc gen (on Windows):
CRRPE1064I Finalizing document generation. Writing output files…
CRRPE3555W PDF warning: Font ‘Liberation Sans’ has not been found. Using ‘Times New Roman’ font instead.
CRRPE3555W PDF warning: Font ‘Arial Unicode MS’ has not been found. Using ‘Times New Roman’ font instead.
CRRPE3555W PDF warning: Font ‘Liberation Serif’ has not been found. Using ‘Times New Roman’ font instead.
CRRPE3555W PDF warning: Font ‘Liberation Mono’ has not been found. Using ‘Times New Roman’ font instead.
CRRPE3555W PDF warning: Arial Unicode MS font is used in the document. Line spacing could be rendered differently.
CRRPE1064I Document generation finished in 5 seconds.

doc gen (on RHEL):
CRRPE1064I Finalizing document generation. Writing output files…
CRRPE3555W PDF warning: Font ‘Arial Unicode MS’ has not been found. Using ‘Abyssinica SIL’ font instead.
CRRPE3555W PDF warning: Font ‘Comic Sans MS’ has not been found. Using ‘Abyssinica SIL’ font instead.
CRRPE3555W PDF warning: Font ‘Times New Roman’ has not been found. Using ‘Abyssinica SIL’ font instead.
CRRPE3555W PDF warning: Arial Unicode MS font is used in the document. Line spacing could be rendered differently.
CRRPE1064I Document generation finished in 4 seconds.

Also some warnings are conflicting.
CRRPE3555W PDF warning: Font ‘Arial Unicode MS’ has not been found. Using ‘Times New Roman’ font instead.
CRRPE3555W PDF warning: Arial Unicode MS font is used in the document. Line spacing could be rendered differently.
When ‘Arial Unicode MS’ font is not used, the last warning should not be shown.

Please advise.

All different fonts are replaced by the same font on both RHEL and Windows, so I don’t think the font subsitution work well?

Please confirm whether it is a defect?

Thanks & regards.
Vincent


Hi Vincent,


Thanks for your inquiry and sorry for the delayed response.

Please note that, different Linux distributions store fonts in different folders. Aspose.Words looks for fonts in several well-known locations. By default, Aspose.Words looks for the fonts in the following locations:

  1. /usr/share/fonts
  2. /usr/local/share/fonts
  3. /usr/X11R6/lib/X11/fonts

This default behaviour will work for most Linux distributions, but not guaranteed to work all of the time. You might need to specify the location of true type fonts explicitly. For this, FontSettings.SetFontsFolder method is used to indicate where Aspose.Words should look for fonts. When a valid path is passed to this method, Aspose.Words no longer looks in the registry but it only scans for fonts within the specified folder.

I would suggest you please try specifying the font folder and let us know how it goes on your side. Below, you can find useful articles:
http://docs.aspose.com/display/wordsnet/How+to++Install+True+Type+Fonts+on+Linux
http://docs.aspose.com/display/wordsnet/How+to++Specify+True+Type+Fonts+Location

Best Regards,

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


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