Free Support Forum - aspose.com

Aspose.Slides - Setting Font-Family and Size?

Is there a way to set the font-family? I see this example of setting several font properties, but I don't see any mention of actually changing the font itself programmatically (to Arial for example). Is Font Height the same as Font-Size?

I'm doing a critical proof of concept that I need to complete today that will determine whether my customer purchases your product. Precise control over the text formatting is critical for them.

http://www.aspose.com/Wiki/default.aspx/Aspose.Slides/ManagingParagraphFont.html

Please do let me know as soon as possible.

Class Portion has a FontIndex property, which points to a font in
presentation’s fonts collection (see Presentation.Fonts property). You
can change the FontIndex property to any existing font. You can add new
font to the collection. And yes, FontHeight defines size of font.

That is short example how to add new font to a presentation:

Dim f As FontEntity = New FontEntity(pres, pres.Fonts(0))
f.FontName = "Tahoma"
f.CharSet = FontCharSet.ANSI_CHARSET
f.Family = FontFamily.DONTCARE
f.Pitch = FontPitch.DEFAULT_PITCH
f.Quality = FontQuality.PROOF_QUALITY
Dim fontIndex As Integer = pres.Fonts.Add(f)

Also you can check example from this thread:
http://www.aspose.com/Community/forums/thread/38957.aspx