Fonts related questions

Hello,


We are using Aspose cells 8.5.2.4 and have following queries with regards to the fonts being used by Aspose to generate the output:

1. What is the font embedding mechanism used by Aspose while generating PDF of the chart?
In PdfSaveOIptions there is method setEmbedStandardWindowsFonts(…) which embeds the font in the pdf. Does it fully embed fonts or the subset? I could not get this information from the javadoc.

2. What is the font emphasise mechanism used by Aspose?
Does Aspose natively emphasise (bold and italicise) text? OR will Aspose require the specific fonts for these?

Thanks,
Neeraj

Hi Neeraj,

Thanks for your posting and using Aspose.Cells.

1. What is the font embedding mechanism used by Aspose while generating PDF of the chart?
In PdfSaveOIptions there is method setEmbedStandardWindowsFonts(…) which embeds the font in the pdf. Does it fully embed fonts or the subset? I could not get this information from the javadoc.

Aspose.Cells always embed fonts inside the generated PDF. Could you please elaborate what do you mean "Does it fully embed fonts or the subset"

2. What is the font emphasise mechanism used by Aspose?
Does Aspose natively emphasise (bold and italicise) text? OR will Aspose require the specific fonts for these?

Aspose.Cells uses fonts from the system directory like C:\Windows\Fonts. Or the fonts from the directory specified using CellsHelper.FontDir proprty. So it means, it does not natively emphasis text. It requires fonts to do so.

Hi Shakeel,

Thanks for the response.

With regards to your concern for the query 1 - there are two mechanisms to include fonts in a PDF:
  • Full Embedding – A full copy of the entire character set of a font is stored in the PDF.
  • Subsetting – Only those characters that are actually used in the lay-out are stored in the PDF. If the “$” character doesn’t appear anywhere in the text, that character is not included in the font. This means that PDF files with subsetted fonts are smaller than PDF files with embedded fonts. For subsetted fonts, the font name is preceded by 6 random characters and a plus sign. Subsetting means that only the portions of the font that are actually used in the document are included in the file.
Hope this clarifies your concern.

Thanks,
Neeraj

Hi Neeraj,

Thanks for your posting and using Aspose.Cells.

We now understand your font related questions and difference between full embedding and subsetting. To answer your questions precisely, we have logged your issue in our database for product team investigation. We will look into it and answer you asap. Once, there is some news for you, we will share it with you.

This issue has been logged as

  • CELLSJAVA-41492 - Fonts related questions

Hi,


Well, we embed subset fonts in the PDF.

2. What is the font emphasise mechanism used by Aspose?
Does Aspose natively emphasise (bold and italicise) text? OR will Aspose require the specific fonts for these?

In PDF file format, we can simulate bold and italic text. But we suggest you to provide specific fonts because we use fonts to measure glyphs (width and height).

Thank you.
Thanks Amjad for the quick response.

The query I have asked is in general and not with regards to a specific font.

Additionally, as per earlier response by Shakeel, Aspose does not natively emphasis text but looks for specific font. Just to avoid the confusion can you please clarify under what scenarios that statement is true?

Thanks,
Neeraj

Hi Neeraj,


That is correct, Aspose.Cells APIs require the font used in the spreadsheet to be present as the APIs look for the fonts by their exact names. Moreover, fonts are required to correctly estimate the glyph size (height & Width) and consequently the size of the cell while rendering the spreadsheets to image formats, PDF & XPS. I strongly suggest you to go through the following article to get better understanding.

Hi Babar,

Thanks for the quick response and sharing the documentation. However, the documentation does not contain the stuff I am looking for.
Just to elaborate the query let's take an example:
For example I use true type font "Helvetica" in my Excel document and apply bold emphasis on it.
I have only "Helvetica" font installed on my machine.
Will you natively emphasis this while generating pdf or image output. OR look for another font with name "Helvetica Bold" on the machine?

Hope that clarifies my concern.

Thanks,
Neeraj
Hi Neeraj,

neergupta:
Just to elaborate the query let's take an example:
For example I use true type font "Helvetica" in my Excel document and apply bold emphasis on it.
I have only "Helvetica" font installed on my machine.
Will you natively emphasis this while generating pdf or image output. OR look for another font with name "Helvetica Bold" on the machine?

Thank you for the clarification.

As narrated earlier, Aspose.Cells APIs look for the fonts by their exact names on the machine. In case the exact font is not found then the APIs will try to select the font with-in the same family.