Font

更新时间:
复制 MD 格式

This topic describes the API operations for managing presentation fonts.

Font

ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(index).TextFrame.GetTextRange(Begin,End).Font

Defines the text attributes of the specified text.

Important

This feature is only supported in the SDK for JavaScript 1.1.14 or later.

  • Syntax

    expression.ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(index).TextFrame.GetTextRange(Begin,End).Font

    Expression: the application object of the document type.

  • Parameters

    Parameter

    Data type

    Default value

    Required

    Description

    Begin

    Number

    Yes

    The text start position.

    End

    Number

    Yes

    The text end position.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
      
    // Return a Font object within the specified range, which contains the text attributes of the specified text.
      const Font = app.ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(1).TextFrame.GetTextRang(1,2).Font;
    }

Properties

ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(index).TextFrame.GetTextRange(Begin,End).Font.Bold

Checks if the font is bold.

Important

This feature is only supported in the SDK for JavaScript 1.1.14 or later.

  • Syntax

    expression.ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(index).TextFrame.GetTextRange(Begin,End).Font.Bold

    Expression: the application object of the document type.

  • Parameters

    Parameter

    Data type

    Required

    Description

    Begin

    Number

    Yes

    The text start position.

    End

    Number

    Yes

    The text end position.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
      
      // Obtain the bold formatting of the font.
      const Bold = app.ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(1).TextFrame.GetTextRang(1,2).Font.Bold;
    }

ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(index).TextFrame.GetTextRange(Begin,End).Font.Italic

Checks if the font style is italic.

Important

This feature is only supported in the SDK for JavaScript 1.1.14 or later.

  • Syntax

    expression.ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(index).TextFrame.GetTextRange(Begin,End).Font.Italic

    Expression: the application object of the document type.

  • Parameters

    Parameter

    Data type

    Required

    Description

    Begin

    Number

    Yes

    The text start position.

    End

    Number

    Yes

    The text end position.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
      
      // Obtain the italic formatting of the font.
      const Italic = app.ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(1).TextFrame.GetTextRang(1,2).Font.Italic;
    }

ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(index).TextFrame.GetTextRange(Begin,End).Font.Name

Obtains the font name.

Important

This feature is only supported in the SDK for JavaScript 1.1.14 or later.

  • Syntax

    expression.ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(index).TextFrame.GetTextRange(Begin,End).Font

    Expression: the application object of the document type.

  • Parameters

    Parameter

    Data type

    Required

    Description

    Begin

    Number

    Yes

    The text start position.

    End

    Number

    Yes

    The text end position.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
      
      // Obtain the font name.
      const Name = app.ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(1).TextFrame.GetTextRang(1,2).Font.Name;
    }

ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(index).TextFrame.GetTextRange(Begin,End).Font.Size

Obtains the font size.

Important

This feature is only supported in the SDK for JavaScript 1.1.14 or later.

  • Syntax

    expression.ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(index).TextFrame.GetTextRange(Begin,End).Font.Size

    Expression: the application object of the document type.

  • Parameters

    Parameter

    Data type

    Required

    Description

    Begin

    Number

    Yes

    The text start position.

    End

    Number

    Yes

    The text end position.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
      
      // Obtain the font size.
      const Size = app.ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(1).TextFrame.GetTextRang(1,2).Font.Size;
    }

ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(index).TextFrame.GetTextRange(Begin,End).Font.Underline

Obtains the underline formatting.

Important

This feature is only supported in the SDK for JavaScript 1.1.14 or later.

  • Syntax

    expression.ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(index).TextFrame.GetTextRange(Begin,End).Font.Underline

    Expression: the application object of the document type.

  • Parameters

    Parameter

    Data type

    Required

    Description

    Begin

    Number

    Yes

    The text start position.

    End

    Number

    Yes

    The text end position.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
      
      // Obtain the underline formatting.
      const Underline = app.ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(1).TextFrame.GetTextRang(1,2).Font.Underline;
    }