Skip to end of metadata
Go to start of metadata
Contents Summary
  

Introduction

This article explains how to format the text. Using PUT /words/{name}/{paragraphPath}/runs/{index}/font API you can update font properties of the text.

Resource URI

~/{file-name}/{paragraphPath}/runs/{index}/font

{file-name} is the name of the Word document containing elements.

{paragraphPath} is the path to specific paragraph in the document. Supported syntax:

  • paragraphs/{paragraphIndex} - references specific paragraph.
  • sections/{sectionIndex}/paragraphs/{paragraphIndex} - references specific paragraph within section.

{index} is the index of specific run.

Resource Properties

Property NameTypeDescription
AllCapsboolTrue if the font is formatted as all capital letters.
BidiboolSpecifies whether the contents of this run shall have right-to-left characteristics.
BoldboolTrue if the font is formatted as bold.
BoldBiboolTrue if the right-to-left text is formatted as bold.
BorderBorderBorder object that specifies border for the font.
ColorColorSpecifies the color of the font.
ComplexScriptboolSpecifies whether the contents of this run shall be treated as complex script text regardless of their Unicode character values when determining the formatting for this run.
DoubleStrikeThroughboolTrue if the font is formatted as double strikethrough text.
EmbossboolTrue if the font is formatted as embossed.
EngraveboolTrue if the font is formatted as engraved.
HiddenboolTrue if the font is formatted as hidden text.
HighlightColorColorSpecifies the highlight (marker) color.
ItalicboolTrue if the font is formatted as italic.
ItalicBiboolTrue if the right-to-left text is formatted as italic.
KerningdoubleSpecifies the font size at which kerning starts.
LocaleIdintSpecifies the locale identifier (language) of the formatted characters. For the list of locale identifiers see http://www.microsoft.com/globaldev/reference/lcid-all.mspx
LocaleIdBiintSpecifies the locale identifier (language) of the formatted right-to-left characters. For the list of locale identifiers see http://www.microsoft.com/globaldev/reference/lcid-all.mspx
LocaleIdFarEastintSpecifies the locale identifier (language) of the formatted Asian characters. For the list of locale identifiers see http://www.microsoft.com/globaldev/reference/lcid-all.mspx
NamestringSpecifies the name of the font.
NameAsciiboolSpecifies the font used for Latin text (characters with character codes from 0 (zero) through 127).
NameBiboolSpecifies the name of the font in a right-to-left language document.
NameFarEastboolSpecifies an East Asian font name.
NameOtherboolSpecifies the font used for characters with character codes from 128 through 255.
NoProofingboolTrue when the formatted characters are not to be spell checked.
OutlineboolTrue if the font is formatted as an outline.
PositiondoubleSpecifies the position of the text (in points) relative to the baseline. A positive number raises the text, and a negative number lowers it.
ScalingintSpecifies character width scaling in percent.
ShadowboolTrue if the font is formatted as shadowed.
SizedoubleSpecifies the font size in points.
SizeBidoubleSpecifies the font size in points used in a right-to-left document.
SmallCapsbool

True if the font is formatted as small capital letters.

SpacingdoubleSpecifies the spacing (in points) between characters.
StrikeThroughboolTrue if the font is formatted as strikethrough text.
StyleIdentifierStyleIdentifierSpecifies the locale independent style identifier of the character style applied to this formatting.
StyleNamestringSpecifies the name of the character style applied to this formatting.
SubscriptboolTrue if the font is formatted as a subscript.
SuperscriptboolTrue if the font is formatted as superscript.
TextEffectTextEffectSpecifies the font animation effect.
UnderlineUnderlineSpecifies the type of underline applied to the font.
UnderlineColorColorSpecifies the color of the underline applied to the font.

cURL Example

Input Document: SampleWordDocument.docx

Output Document: ResultWordDocument.docx

 Request
 Response

SDKs

Using an SDK (API client) is the quickest way for a developer to speed up the development. An SDK takes care of a lot of low-level details of making requests and handling responses and lets you focus on writing code specific to your particular project. Check out our GitHub repository for a complete list of Aspose.Words SDKs along with working examples, to get you started in no time. Please check Available SDKs article to learn how to add an SDK to your project.

SDK Examples

 C#
 Java
 Python
 Ruby
 Node.js
 Android
 Swift
 Go
Labels
  • No labels