VML TextPath Element

This topic describes VML, a feature that is deprecated as of Windows Internet Explorer 9. Webpages and applications that rely on VML should be migrated to SVG or other widely supported standards.

Note

As of December 2011, this topic has been archived. As a result, it is no longer actively maintained. For more information, see Archived Content. For information, recommendations, and guidance regarding the current version of Windows Internet Explorer, see Internet Explorer Developer Center.

 

Defines a text path for a shape.

The following attributes modify a text path.

Attribute Description
FitPath Defines whether the text fits the path of a shape.
FitShape Defines whether the text fits the shape boundaries.
Font-Family Specifies the font-family of text.
Font-Size Specifies the font-size of text.
Font-Style Specifies the font-style of text.
Font-Variant Specifies the font-variant of text.
Font-Weight Specifies the font-weight of text.
Font Specifies the compound font value of text.
MSO-Text-Shadow Defines whether a shadow is applied to the text.
On Defines whether the text is displayed.
String Defines the text string.
Text-Decoration Defines the text-decoration of the text.
Trim Defines whether extra space is removed above and below the text.
V-Rotate-Letters Determines whether the letters of the text are rotated.
V-Same-Letter-Heights Determines whether all letters will have the same height.
V-Text-Align Defines the alignment of the text.
V-Text-Kern Determines whether kerning is turned on.
V-Text-Reverse Determines whether the layout order of rows is reversed.
V-Text-Spacing-Mode Defines the mode for letterspacing.
V-Text-Spacing Defines the amount of spacing for text.
XScale Determines whether a straight textpath will be used instead of the shape path.

 

Remarks

This element must be defined within a Shape element.

In addition to the normal fill, string, and style attributes, the TextPathOK attribute of Path must be set to True and the On attribute of TextPath must be set to True to display text on a text path.

The following is the minimum code needed to display text on a path.

   <v:line from="50 200" to="400 100">
   <v:fill on="True" color="red"/>
   <v:path textpathok="True"/>
   <v:textpath on="True" string="VML Text"
   style="font:normal normal normal 36pt Arial"/>
   </v:line>

Examples