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

Free Support Forum - aspose.com

Embedded Font randomly replaced by default font

Hello,

We are using Aspose.PDF .Net and we embed Noto Sans font that is used for text in the documents. We are building multi-page documents that are also combination of existing and newly generated documents. We are noticing random behavior related to the headers of the documents - sometimes the embedded font will be used and sometimes default font will be used. Our application is running on .Net Core 3.1 and it is hosted as Linux Docker container. When we install in the Docker container MS Core fonts we see that for some page headers Noto Sans is used and for other MS Core font is used. We would prefer not to add MS Core fonts but without it we are getting error that Aspose.PDF is looking for “Symbol” font and that can’t be found. We have requirement to use only Noto Sans font. We are using table for the headers and the most left cell is having this random embedded font behavior. We are using the same logic to generate all document headers and we are not able to identify the reason for the random behavior described above.

Please let us know what information will be useful for you to give us further guidance.

Thank you!

We are loading Noto Sans via FontRepository.OpenFont and using it in a 2x2 Table in the header. The top-left cell (row 0, cell 0) occasionally does not get rendered by Apose.PDF as Noto Sans, and instead is rendered with either Times New Roman (on Windows 10) or presumably Symbol (on a Debian container). The behavior seems to be unpredictable, especially since the font is set the same way for both text fragments in the top row of the table, and the right column (cell 1) is always rendered with Noto Sans.

Opening the generated PDF on Windows 10 in a text editor verifies that Aspose.PDF is using Times New Roman for the font. On Debian, Aspose.PDF throws an exception with the following message:

Format of font “Symbol” is not supported for new composite fonts

We would like to avoid adding the MS core fonts as a dependency, and definitely want to use Noto Sans for the entire header if possible.