FontSettingCollection
FontSettingCollection class
Represents the list of FontSetting.
class FontSettingCollection;
Properties
| Property | Type | Description | 
|---|---|---|
| textAlignment | ShapeTextAlignment | Readonly. Represents the alignment setting of the text body. | 
| textParagraphs | TextParagraphCollection | Readonly. Gets all paragraphs. | 
| text | string | Gets and sets the text of the shape. | 
| htmlString | string | Gets and sets the html string which contains data and some formats in this shape. | 
Methods
| Method | Description | 
|---|---|
| get(number) | Gets the FontSetting by the index. | 
| getTextAlignment() | @deprecated. Please use the ’textAlignment’ property instead. Represents the alignment setting of the text body. | 
| getTextParagraphs() | @deprecated. Please use the ’textParagraphs’ property instead. Gets all paragraphs. | 
| getText() | @deprecated. Please use the ’text’ property instead. Gets and sets the text of the shape. | 
| setText(string) | @deprecated. Please use the ’text’ property instead. Gets and sets the text of the shape. | 
| getHtmlString() | @deprecated. Please use the ‘htmlString’ property instead. Gets and sets the html string which contains data and some formats in this shape. | 
| setHtmlString(string) | @deprecated. Please use the ‘htmlString’ property instead. Gets and sets the html string which contains data and some formats in this shape. | 
| setWordArtStyle(PresetWordArtStyle) | Sets the preset WordArt style. | 
| getParagraphEnumerator() | Gets the enumerator of the paragraphs. | 
| appendText(string) | Appends the text. | 
| insertText(number, string) | Insert index at the position. | 
| replace(number, number, string) | Replace the text. | 
| replace(string, string) | Replace the text. | 
| deleteText(number, number) | Delete some characters. | 
| format(number, number, Font, StyleFlag) | Format the text with font setting. | 
| clear() | Clear all setting. | 
| getCount() | @deprecated. Please use the ‘count’ property instead. Gets the number of elements contained in. | 
| isNull() | Checks whether the implementation object is null. | 
| equals(Object) | |
| getHashCode() | 
textAlignment
Readonly. Represents the alignment setting of the text body.
textAlignment : ShapeTextAlignment;
textParagraphs
Readonly. Gets all paragraphs.
textParagraphs : TextParagraphCollection;
text
Gets and sets the text of the shape.
text : string;
htmlString
Gets and sets the html string which contains data and some formats in this shape.
htmlString : string;
get(number)
Gets the FontSetting by the index.
get(index: number) : FontSetting;
Parameters:
| Parameter | Type | Description | 
|---|---|---|
| index | number | The index. | 
Returns
getTextAlignment()
@deprecated. Please use the ’textAlignment’ property instead. Represents the alignment setting of the text body.
getTextAlignment() : ShapeTextAlignment;
Returns
getTextParagraphs()
@deprecated. Please use the ’textParagraphs’ property instead. Gets all paragraphs.
getTextParagraphs() : TextParagraphCollection;
Returns
getText()
@deprecated. Please use the ’text’ property instead. Gets and sets the text of the shape.
getText() : string;
setText(string)
@deprecated. Please use the ’text’ property instead. Gets and sets the text of the shape.
setText(value: string) : void;
Parameters:
| Parameter | Type | Description | 
|---|---|---|
| value | string | The value to set. | 
getHtmlString()
@deprecated. Please use the ‘htmlString’ property instead. Gets and sets the html string which contains data and some formats in this shape.
getHtmlString() : string;
setHtmlString(string)
@deprecated. Please use the ‘htmlString’ property instead. Gets and sets the html string which contains data and some formats in this shape.
setHtmlString(value: string) : void;
Parameters:
| Parameter | Type | Description | 
|---|---|---|
| value | string | The value to set. | 
setWordArtStyle(PresetWordArtStyle)
Sets the preset WordArt style.
setWordArtStyle(style: PresetWordArtStyle) : void;
Parameters:
| Parameter | Type | Description | 
|---|---|---|
| style | PresetWordArtStyle | The preset WordArt style. | 
getParagraphEnumerator()
Gets the enumerator of the paragraphs.
getParagraphEnumerator() : TextParagraphEnumerator;
Returns
appendText(string)
Appends the text.
appendText(text: string) : void;
Parameters:
| Parameter | Type | Description | 
|---|---|---|
| text | string | The text. | 
insertText(number, string)
Insert index at the position.
insertText(index: number, text: string) : void;
Parameters:
| Parameter | Type | Description | 
|---|---|---|
| index | number | The start index. | 
| text | string | The text. | 
replace(number, number, string)
Replace the text.
replace(index: number, count: number, text: string) : void;
Parameters:
| Parameter | Type | Description | 
|---|---|---|
| index | number | The start index. | 
| count | number | The count of characters. | 
| text | string | The text. | 
replace(string, string)
Replace the text.
replace(oldValue: string, newValue: string) : void;
Parameters:
| Parameter | Type | Description | 
|---|---|---|
| oldValue | string | The old text. | 
| newValue | string | The new text. | 
deleteText(number, number)
Delete some characters.
deleteText(index: number, count: number) : void;
Parameters:
| Parameter | Type | Description | 
|---|---|---|
| index | number | The start index. | 
| count | number | The count of characters. | 
format(number, number, Font, StyleFlag)
Format the text with font setting.
format(startIndex: number, length: number, font: Font, flag: StyleFlag) : void;
Parameters:
| Parameter | Type | Description | 
|---|---|---|
| startIndex | number | The start index. | 
| length | number | The length. | 
| font | Font | The font. | 
| flag | StyleFlag | The flags of the font. | 
clear()
Clear all setting.
clear() : void;
getCount()
@deprecated. Please use the ‘count’ property instead. Gets the number of elements contained in.
getCount() : number;
isNull()
Checks whether the implementation object is null.
isNull() : boolean;
equals(Object)
equals(obj: Object) : boolean;
Parameters:
| Parameter | Type | Description | 
|---|---|---|
| obj | Object | 
getHashCode()
getHashCode() : number;