Main Content

mlreportgen.ppt.FontFamily Class

Namespace: mlreportgen.ppt

Description

Font family for presentation text.

The mlreportgen.ppt.FontFamily class is a handle class.

Creation

Description

fontFamilyObj = FontFamily specifies a Times New Roman font family.

example

fontFamilyObj = FontFamily(fontStr) specifies a font family.

fontFamilyObj = FontFamily(fontStr,complexScriptFont) specifies a font family to use for complex scripts.

Input Arguments

expand all

Font family, specified as a character vector. Specify a font that appears in the PowerPoint® list of fonts in the Home tab Font area.

Font family for complex scripts, specified as a character vector. Specify a font family for substituting in a locale that requires a complex script (such as Arabic) for rendering text.

Properties

expand all

Font family for complex scripts, specified as a character vector. Specify a font family for substituting in a locale that requires a complex script (such as Arabic) for rendering text.

Font family, specified as a character vector. Specify a font that appears in the PowerPoint list of fonts in Home tab Font area.

ID for this PPT API object, specified as a character vector or string scalar. A session-unique ID is generated as part of the object creation. You can specify an ID to replace the generated ID.

Attributes:

NonCopyable
true

Data Types: char | string

Tag for this PPT API object, specified as a character vector or string scalar. A session-unique tag is generated as part of the creation of this object. The generated tag has the form CLASS:ID, where CLASS is the object class and ID is the value of the Id property of the object.

Specifying your own tag value can help you to identify where issues occur during presentation generation.

Attributes:

NonCopyable
true

Data Types: char | string

Examples

collapse all

Create a presentation.

import mlreportgen.ppt.*

ppt = Presentation('myFontFamilyPresentation.pptx');
open(ppt);

titleSlide = add(ppt,'Title and Content');

Create a paragraph and append text with text that uses the monospace font Courier New.

p = Paragraph('Use the ');

tFunc = Text('zeros');
tFunc.Style = {FontFamily('Courier New')};
append(p,tFunc);

tDesc = Text(' function to set an array to all zeros.');
append(p,tDesc);

Add the paragraph to the slide. Close and view the presentation.

replace(titleSlide,'Content',p);

close(ppt);
rptview(ppt);

Version History

Introduced in R2015b