TextPath Example (different styles)

Click the button to change the text style and position. The default font is 36pt Arial. Style changes the text to italic, Weight changes it to bold, Size changes it to 48 points, Family changes it to Times Roman, Move shifts the text 1 inch left, and Rotate gives the text a 10 degree rotation. Click Reset to get back to normal.

Example

Code

<!-- Include the VML behavior -->
<style>v\: * { behavior: url(#default#VML);display:inline-block }</style>

<!-- Declare the VML namespace -->
<xml:namespace ns="urn:schemas-microsoft-com:vml" prefix="v"/>

<v:shape id="text01"
coordorigin="-100 100" coordsize="200 200"
path="m 0,200 l 100,200 x e"
style='position:relative;top:.1in;left:1in;width:3in;height:1.5in'
strokecolor="red" strokeweight=".5pt">
<v:path textpathok="True" />
<v:fill on="True" color="red" type="solid"/>
<v:textpath on="True" id="mytp"
style="font:normal normal normal 36pt Arial"
xscale="True" string="Hello VML"/>
</v:shape>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<input type="BUTTON" value="Style" name="Button1">
<input type="BUTTON" value="Weight" name="Button2">
<input type="BUTTON" value="Size" name="Button3">
<input type="BUTTON" value="Family" name="Button4">
<input type="BUTTON" value="Move" name="Button5">
<input type="BUTTON" value="Rotate" name="Button6">
<input type="BUTTON" value="Reset" name="Button0">

<script language="VBScript">
<!--
Sub Button0_OnClick
  text01.style.left = "1in"
  text01.rotation = "0"
  mytp.style.font = "normal normal normal 36pt Arial"
End Sub

Sub Button1_OnClick
  mytp.style.fontstyle = "Italic"
End Sub

Sub Button2_OnClick
  mytp.style.fontweight = "Bolder"
End Sub

Sub Button3_OnClick
  mytp.style.fontsize = "48pt"
End Sub

Sub Button4_OnClick
  mytp.style.fontfamily = "Times New Roman"
End Sub

Sub Button5_OnClick
  text01.style.left = "2in"
  mytp.style.fontfamily = "Times New Roman"
End Sub

Sub Button6_OnClick
  text01.rotation = "10"
End Sub
-->
</script>