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.

fontFamilyObj = FontFamily(fontStr) specifies a font family.

example

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

Input Arguments

expand all

Font family, specified as a character vector or string scalar. 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 or string scalar. 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 or string scalar. 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 or string scalar. Specify a font that appears in the PowerPoint list of fonts in Home tab Font area.

Object identifier for the mlreportgen.ppt.FontFamily object, specified as a character vector or string scalar. The PPT API generates a session-unique identifier when it creates the document element object. You can specify your own value for Id.

Attributes:

NonCopyable
true

Data Types: char | string

Tag for the mlreportgen.ppt.FontFamily object, specified as a character vector or string scalar. The PPT API generates a session-unique tag 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. Specify your own tag value to help you identify where to look when an issue occurs during document 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);

Sample slide with the paragraph "Use the zeros function to set an array to all zeros. The first use of zeros is in Courier New font.

Version History

Introduced in R2015b