There are a handful of text properties which affect text spacing. Each is applied with child elements within the <rPr> element. Other text formatting, such as bold, size, shading, and borders, is covered in separate pages.
Note: Whitespace in XML is not always preserved. As with any XML, to preserve spaces in OOXML, the space attribute must be set to preserve: <w:t xml:space="preserve">.
|spacing||Specifies the amount of character pitch to be added or removed after each character. <spacing w:val="200"/>.
The single attribute is val. It specifies a positive or negative measurement in twentieths of a point (equivalent to 1/1440th of an inch). Compare spacing with the w property, which stretches or expanded each character.
Reference: ECMA-376, 3rd Edition (June, 2011), Fundamentals and Markup Language Reference § 22.214.171.124.
|w||Specifies the amount to stretch or compress each character. <w w:val="200%"/>.
The single attribute is val. Note the minimum value is 1% and the maximum is 600%. Compare w with the spacing property, which expands/compresses the text by adding additional character pitch but not changing the width of the characters.
Note: The 2006 version specifies that the value of the val without a percent sign (%) [<w w:val="200"/>], but the 2011 version added the percent sign (%) [<w w:val="200%"/>]. Including the percent sign causes an error in Microsoft Word 2007.
Reference: ECMA-376, 3rd Edition (June, 2011), Fundamentals and Markup Language Reference § 126.96.36.199.
Specifies whether font kerning should be applied to the text.
Kerning is the process of adjusting the spacing between characters in a proportional font. It moves the letters closer together. It is specified with the <w:kern> element.
The single attribute is val. It specifies the smallest font size which will have kerning automatically adjusted. If the font size as specified by the sz element is smaller than the value specified by the val attribute, then no kerning will be applied. The attribute value is specified in half-points (1/144 of an inch).
Reference: ECMA-376, 3rd Edition (June, 2011), Fundamentals and Markup Language Reference § 188.8.131.52.
|fitText||Specifies that the content is to be resized to fit the width specified by the val attribute rather than automatically
displayed based on the width of the content. The expansion or contraction is performed by increasing or decreasing the size of each character.
<fitText w:id="50" w:val="1440"/>.
Reference: ECMA-376, 3rd Edition (June, 2011), Fundamentals and Markup Language Reference § 184.108.40.206.
Related CSS property:
<div style="word-spacing: 10px;"> they call us by our name, and as soon as we have recognized their voice the spell</div>
<div> is broken. We have delivered them;</div>
<div style="max-width:50px">they have overcome death and return to share our life.</div>