Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

mlreportgen.ppt.FontFamily class

Package: mlreportgen.ppt
Superclasses:

Description

Font family for presentation text.

Construction

fontFamilyObj = FontFamily() specifies a Times New Roman font family.

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.

Output Arguments

expand all

Font family, returned as an mlreportgen.ppt.FontFamily object.

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 PPT API object, specified as a character vector. A session-unique ID is generated as part of object creation. You can specify an ID to replace the generated ID.

Tag for this PPT API object, specified as a character vector. 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.

An example of a reason for specifying your own tag value is to make it easier to identify where an issue occurred during presentation generation.

Examples

expand all

Create a presentation.

import mlreportgen.ppt.*

slidesFile = 'myFontFamilyPresentation.pptx';
slides = Presentation(slidesFile);

titleSlide = add(slides,'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 and close the presentation.

replace(titleSlide,'Content',p);

close(slides);

Open myFontFamilyPresentation.pptx. On a Windows® platform, you can open the presentation in MATLAB®:

if ispc
    winopen(slidesFile);
end

Introduced in R2015b

Was this topic helpful?