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

Introduction

This article explain how to format the text. Using POST /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.
ColorColorGets or sets 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.
HighlightColorColorGets or sets the highlight (marker) color.
ItalicboolTrue if the font is formatted as italic.
ItalicBiboolTrue if the right-to-left text is formatted as italic.
KerningdoubleGets or sets the font size at which kerning starts.
LocaleIdintGets or sets the locale identifier (language) of the formatted characters. For the list of locale identifiers see http://www.microsoft.com/globaldev/reference/lcid-all.mspx
LocaleIdBiintGets or sets 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
LocaleIdFarEastintGets or sets 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
NamestringGets or sets the name of the font.
NameAsciiboolReturns or sets the font used for Latin text (characters with character codes from 0 (zero) through 127).
NameBiboolReturns or sets the name of the font in a right-to-left language document.
NameFarEastboolReturns or sets an East Asian font name.
NameOtherboolReturns or sets 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 outline.
PositiondoubleGets or sets the position of text (in points) relative to the base line. A positive number raises the text, and a negative number lowers it.
ScalingintGets or sets character width scaling in percent.
ShadowboolTrue if the font is formatted as shadowed.
SizedoubleGets or sets the font size in points.
SizeBidoubleGets or sets the font size in points used in a right-to-left document.
SmallCapsbool

True if the font is formatted as small capital letters.

SpacingdoubleReturns or sets the spacing (in points) between characters.
StrikeThroughboolTrue if the font is formatted as strikethrough text.
StyleIdentifierStyleIdentifierGets or sets the locale independent style identifier of the character style applied to this formatting.
StyleNamestringGets or sets the name of the character style applied to this formatting.
SubscriptboolTrue if the font is formatted as subscript.
SuperscriptboolTrue if the font is formatted as superscript.
TextEffectTextEffectGets or sets the font animation effect.
UnderlineUnderlineGets or sets the type of underline applied to the font.
UnderlineColorColorGets or sets 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. Checkout 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#
 Python
Labels
  • No labels