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.FontSize class

Package: mlreportgen.ppt
Superclasses:

Description

Specifies the size of a font.

Construction

fontSizeObj = FontSize() an empty font size object.

fontSizeObj = FontSize(sizeStr) specifies the specified font size.

Input Arguments

expand all

Font size, specified in the form valueUnits, where Units is an abbreviation for the units. These abbreviations are valid:

  • px — pixels (default)

  • cm — centimeters

  • in — inches

  • mm — millimeters

  • pc — picas

  • pt — points

Output Arguments

expand all

Font size, returned as an mlreportgen.ppt.FontSize object.

Properties

expand all

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.

Font size, specified in the form valueUnits, where Units is an abbreviation for the units. These abbreviations are valid:

  • px — pixels (default)

  • cm — centimeters

  • in — inches

  • mm — millimeters

  • pc — picas

  • pt — points

Examples

expand all

Create a presentation.

import mlreportgen.ppt.*

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

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

Create a paragraph and append text in a large font size.

p = Paragraph();

tWarning = Text('WARNING:');
tWarning.Style = {FontSize('40pt'),Bold(true),FontColor('red')};
append(p,tWarning);

tDesc = Text(' Unplug the machine before doing the next steps.');
append(p,tDesc);

Add the paragraph to the slide, generate the presentation, and open myFontFamilyPresentation. (The winopen code works on Windows® platforms.)

replace(titleSlide,'Content',p);

close(slides);

if ispc
    winopen(slidesFile);
end

Introduced in R2015b

Was this topic helpful?