Free Support Forum - aspose.com

External fonts metadata

Hi Aspose!

We are using Aspose.Slides for .NET with external fonts in our application (some of they are our custom fonts) and need to know the following:
As different font files sometimes have only a few metadata fields populated we would like to know which particular fields are crucial for ASPOSE in order to get the font correctly converted.
Maybe you can forward us to some documentation about this.

As additional information which may help: We are using open source FontForge in order to adjust metadata fields, so perhaps you could give us an example of such necessary fields from FontForge data field options perspective.

Thanks in advance!

@mititch

Can you please share the details that what you ought to do using Aspose.Slides. Can you please also provide the information with relation to PowerPoint as well that you ought to perform using Aspose.Slides.

Hey, Mudassir.
I will not be able to elaborate on the former:

But I surely can on the latter.
As every font file has different metadata we are opening font files with Font Forge application. Before using Aspose we were editing the following metadata fields:PS Names:

  • Family Name;
  • Name For Humans.

TTF Names:

  • Preferred Family

Now, after the switch to Aspose it seems that not all of these fields are required by the converter, yet it is still, unclear which fields are important. This is why we need to determine which exact fields are processed by Aspose and how it for example draws a distinction between Arial Regular and Arial Bold.

@callmevk,

From Aspose.Slides perspective the API can only tell which of fonts are used inside presentation by mentioning the names. The details related to Fonts metadata is not in API mandate as it only use the fonts and provide the name of that.

OK, let’s have an example.

If fonts are not embedded into the PowerPoint presentation – how does Aspose tell what is the name of the font used? I suppose there has to be a name of the font in the presentation itself – where is it?

Our method of taking the name of the font from a PowerPoint file shows that PowerPoint stores font name taken from it’s metadata, not the filename. E.g.: if you extract a PowerPoint file and then navigate to ppt/slides/slide1.xml – you can see the name of the font file there after “typeface=”.
Which means that actual font file name installed on computer can be “1.ttf” while metadata will say “Arial” and thus Arial will be stored as a name in PowerPoint and in .xml file as “typeface=“Arial””.

This is why we have a question on how Aspose gets its font names from a PowerPoint file.

@callmevk

The font names that are provided via Slides API are the same as defined in PowerPoint document (PPTX) in “typeface” attributes in XML. The API does not do any thing by itself. But when we export to the other format occurs (let’s say, to the image), we may do a font substitution (according to the same rules as PowerPoint), if the font name that has been used is not available on the system and not embedded.

@mudassir.fayyaz, could you please elaborate on the processa as asnwer is not self evident:

  • “typeface” field in PowerPoint ≠ font file name;
  • font files can have multiple metadata fields containing same information as information from PowerPoint “typeface” data.

How exactly Aspose can tell which font file to use when it gets the data from PowerPoint?
Is it looking for a metadata field that would match with “typeface” info? If so, what field is that?
Is it looking for a font file name similar to “typeface” information?

@callmevk

I have created a ticket with ID SLIDESNET-42119 in our issue tracking system to further investigate your requirements. We will share the feedback with you as soon as the issue will be addressed.

Thank you kindly, @mudassir.fayyaz.

Awaiting for further feedback.

@callmevk

We will apprise you as soon as response will be shared.

Hello @mudassir.fayyaz.
Checking back to see if there are any updates on this one.

@callmevk

I regret to share that at present the issue is unresolved. We will share notification with you as soon as the issue will be fixed.

Thanks for the update @mudassir.fayyaz.
Looking forward for an update.

@callmevk

We will share the updates with you as soon as they will be shared.

Hi Mudassir, We are not seeking any fix as a part of this ticket. We are only looking for clarification on what information Aspose uses to locate fonts from local storage? Is there a way this can be accelerated and the necessary information provided?

@reach.sathya

I request for your patience. Actually, your question is pertinent to internal API design. We will share the feedback with you as soon as it will be shared.

Hello @mudassir.fayyaz,

Just checking back to see if there’s an update.

@callmevk

We have investigated the issue further. We need to know the scenario where you are interested in using Aposse.Slides in the form of sample example and working presentation as it is important because it is directly related to how Aspose.Slides works with fonts in different scenarios. If you just loads PPTX and save presentation as ODP/PPT/HTML/SVG or modify and save it as other PPTX document, Aspose.Slides not needed to work with fonts metadata.

Where as if, you are rendering a thumbnail or exporting presentation to PDF, we use .NET Framework classes for working with fonts (they have their own infrastructure to match font families with fonts installed on the machine).

If you can share an example (snippet and document) where Slides not matched expectations, we may provide more info on the topic. Actually, what you are requesting is deeply related to internal API working and we may not divulge that. Therefore, perhaps with sample example, we may observe and assess that what information may be shared publicly or not.

Thank you for the update, @mudassir.fayyaz.

I will talk to the team and we will get back to you shortly.

I will give you an example today and we will try to send a presentation tomorrow.

  1. We upload presentation with font “Helvetica Now Text”. The font is available in our local storage as “helveticanowtext-regular-sans-serif-scalable-normal-normal-normal-regular.ttf”. However, Aspose is unable to pick up the font accurately which results in distorted display of font in the presentation.

Does Aspose expect the files to adhere to any standard naming convention in our storage to ensure the right fonts are picked up based on what is included in the presentation? We are using the .NET framework for converting slides into thumbnails and are seeing a high level of font failures.

We would like to understand how we need to set up our internal fonts storage, so Aspose can pick up the right fonts using its algorithms.