Is it possible to set a font by name?

Is it possible to set a font by name?

IF it is - how do you do it?

Thanks.

Any ppt file has at least one font so to add new one we need simply clone it and change font name.



FontEntity newFont = new FontEntity(pres, pres.Fonts[0]);

newFont.FontName = “Courier New”;

int fontIndex = pres.Fonts.Add(newFont);



After that you can use index of new font to change portions of text.

Sometime you should change also CharSet, Family, Pitch and Quality of a font.

Hi

I am inserting a table in to slide.But I am getting problem with font size.

How to change font size in power point?

Thanks

Dear umchand,

Thanks for considering Aspose.Slides.

First get the reference to the TextFrame of your cell; you can get it like this.

TextFrame tf=yourTable.GetCell(0,0).TextFrame;

Then change the font height

tf.Paragraphs[0].Portions[0].FontHeight=16;

For more information, please see this thread.

<A href="</A> </P></FONT>