How to set font style to all Presentation file using Aspse.Slides


#1

Hi, Is there any way I can set the default font style I can use in the presentation?
Right now, it’s difficult to set each and every where use some font before write text. So, if we can set default font style to use, then that will help me.

thanks


#2

Hi Praveen,

You may please add the fonts using Presentation class object and can set the the font on portion level by just calling the Portion.FontIndex property. Please follow this thread link for necessary details. Aspose.Slides sets 'Arial' to be the default presentation font, if no other font is added or selected. You may access the default font and change the font name to any of desired family and it will be set for all portions inside the presentation. Please use the following code snippet to achieve this.

FontEntity fntEnt = pres.Fonts[0];

fntEnt.FontName = "Times New Roman";

Thanks and Regards,


#3

Sorry forgot to mention. I need it for PPTX version. I am not finding any property for PresentationEx called Fonts.
Please help me out.


#4

Hi Praveen,

I feel sorry to inform you that you may set font on text frames levels in PPTX. You can set font for particular text frame in PPTX and these font related properties are either applied on paragraph level for all portions in a paragraph or they can be applied on individual portion level. At paragraph level, the font properties can be set by using "DefaultCharacterProperties" property of ParagraphEx class. Please follow this thread link for further details.

Thanks and Regards,


#5

the link provided doesn’t work =\


#6

@obrusentsov,

Can you please explain your requirement that what you like to Aspose.Slides offer you.