<fitText> (Manual Run Width)

This element specifies that the contents of this run shall not be automatically displayed based on the width of its contents, rather its contents shall be resized to fit the width specified by the @val attribute. This expansion/contraction shall be performed by equally increasing/decreasing the size of each character in this run's contents when displayed.

If this element is omitted, then the contents of this run shall be displayed based on the size of its contents.

example:
<w:r>
  <w:rPr>
    <w:fitText w:id="50" w:val="720" />
  </w:rPr>
  <w:t>This text shall be displayed in one-half of an inch.</w:t>
</w:r>

The resulting run contents shall be displayed in exactly 720 twentieths of a point (one half of an inch) when displayed in a document. ]

Parent Elements

<rPr>2.7.8.1); <rPr>2.3.1.29); <rPr>2.5.2.26); <rPr>2.3.2.25); <rPr>2.3.2.26); <rPr>2.7.4.4); <rPr>2.3.1.30); <rPr>2.9.26); <rPr>2.5.2.27); <rPr>2.7.5.2)

Attributes

Description

<id> (Fit Text Run ID)

Specifies a unique ID which shall be used to link multiple contiguous runs containing <fitText> elements to each other to ensure that their contents are correctly merged into the specified width in the document.

This means that multiple runs which are broken apart due to differences in formatting can be identified as belonging to the same grouping in terms of <fitText> properties, although they are multiple runs of text in the WordprocessingML.

If the runs are not contiguous, then the @id attribute is ignored, and the runs are not linked.

If this attribute is omitted, then this run has no id and shall not be linked with any other run in the parent paragraph.

<w:r>
  <w:rPr>
    <w:fitText w:id="99" w:val="1440" /> 
  </w:rPr>
  <w:t>fit this into</w:t> 
</w:r>
<w:r>
  <w:rPr>
    <w:b/> 
    <w:fitText w:id="99" w:val="1440" /> 
   </w:rPr>
  <w:t>one</w:t> 
</w:r>
<w:r>
  <w:rPr>
    <w:fitText w:id="99" w:val="1440" /> 
   </w:rPr>
  <w:t>inch</w:t> 
</w:r>

Although there are three runs of content, all three regions shall be combined into a single fit text region (e.g. they all fit into one inch, rather than one inch each) based on the identical value used in the @id attribute for all three runs. ]

The possible values for this attribute are defined by the ST_DecimalNumber simple type (§2.18.16).

<val> (Value)

This attribute specifies the exact width of space which this run shall be fit into when displayed in the document.

<w:r>
  <w:rPr>
    <w:fitText w:id="50" w:val="720" />
  </w:rPr>
  <w:t>This text shall be displayed in one-half of an inch.</w:t>
</w:r>

The resulting run contents shall be displayed in exactly 720 twentieths of a point (one half of an inch) when displayed in a document. ]

The possible values for this attribute are defined by the ST_TwipsMeasure simple type (§2.18.105).

The following XML Schema fragment defines the contents of this element:

<complexType name="CT_FitText">
	<attribute name="val" type="ST_TwipsMeasure" use="required"/>
	<attribute name="id" type="ST_DecimalNumber" use="optional"/>
</complexType>