Japanease fonts in MasterTheme.FontSchema are not applied on thumnails

I found japanese fonts are not applied on thumnails.
I found PortionFormat.EastAsianFont is null.

I tried this:

if (portion.PortionFormat.EastAsianFont == null)
{
portion.PortionFormat.EastAsianFont = new FontData("+mj-ea");
}

Then correct fonts are applied on thumnails.
I found when PortionFormat.EastAsianFont is not null, fonts are applied on thumnails.

If I can know the correct font in portion is "+mj-ea" or "+mn-ea", I will resolve this probrem. But I can't find the way.

What would be the best way to do this?

Thank you in advance.

Hi Yuki,


Thank you for inquiring Aspose.Slides.

I have observed your comments and like to share with you that you can know the font name by using the following sample code on your end.

Presentation pres = new Presentation(“D://portion-format-test.pptx”);
foreach (ISlide slide in pres.Slides)
{
foreach (IShape shp in slide.Shapes)
foreach (IParagraph paragraph in ((IAutoShape)shp).TextFrame.Paragraphs)
{
foreach (IPortion portion in paragraph.Portions)
{
if ((portion.Text.Length != 0))
{
Console.WriteLine("PTEXT: " + portion.Text);
if (portion.PortionFormat.EastAsianFont != null)
Console.WriteLine("FontName: " + portion.PortionFormat.EastAsianFont.FontName);

}
}
}
}

I hope this will be helpful. Please share if I may help you further in this regard.

Best Regards,
Hi Muhamma,

Thank you for your advice.
But I did not mean it.

I create a program that it create thumnails from PPTX crated by anyone.

Please look attached two images.

'Thumnail_by_Ppt.jpg' was created by Microsoft Powerpoint.
'Thumnail_by_Aspose.jpg' was created by Aspose Slides.

Two images is different.
My guess is that because image created by Aspose.Slides is not applied correct fonts.

Is there the way to apply correct fonts?
Or Could you fix if it is a bug?

Thanks.

Hi Yuki,


I have observed the images shared by you. I have only been able to spot the difference as the text, in thumbnail which is generated by Aspose.Slides, appears bigger and bold. Is this what you mean?
Please let us know if you are observing any other difference, so that I may log a ticket in our issue management system with all the details in order to investigate and resolve this issue. Also, I request you to please try using Aspose.Slides for .NET 15.6.0 on your end before you share your valuable feedback with us.

Best Regards,
Hi Muhammad,

I mean it exactly, and I tried investigating the cause of the difference, and I found Portion.EastAsianFont is null.
I tried using Aspose.Slides for .NET 15.6.0 but the image was still different.
I think the cause of difference is the difference of fonts.
I'd appreciate it if investigation is finished.

Thank you in advance.

Hi Yuki,


I have worked with the presentation file shared by you but I am unable to reproduce the issue on my end. I have attached the thumbnail which I have created on my end using Aspose.Slides for .NET 15.6.0. The text is not appearing as bold or bigger. However, I can see some additional spaces between characters which is the only issue appearing on my end. Please share your environment details so that I may reproduce the issue on my end.

Best Regards,
Hi Muhammad,

The issue that the text is appearing bold was resolved using Aspose.Slides for .Net 15.6.0. But the issue that the text is not applied correct font is not resolved yet.
It looks like some additional spaces between characters, because the font is different.
The correct font is "MS PGothic". It is called a proportional font that the character width is different font for each character. The wrong font is "MS Gothic". It is called a monospaced font that the character width is same font for each character. Especially full width parentheses is different. It used "MS PGothic" are about 0.5em, it used "MS Gothic" are 1em.
The powerpoint file is setted the major (Headings) and minor (Body) fonts are "MS PGothic".
I set the text to the major font using Microsoft Powerpoint, the text was applied "MS Gothic" in thumbnail using Aspose.Slides. I guess Aspose.Slide can not get the font in the portion and "MS Gothic" that is the default japanese font is applied.

I have bad English, so I apologize if I say something strange.

Thanks.
Hi Yuki,

I have observed your comments and I have been able to reproduce the issue. A ticket with ID SLIDESNET-36646 has been logged in our issue tracking system to further investigate and resolve the issue. We will take into consideration all your findings. This thread has been linked with the issue so that you may be automatically notified once the issue will be resolved.

We are sorry for your inconvenience,