XML/SVG/textPath

Материал из Web эксперт
Перейти к: навигация, поиск

Circular text

<svg>
  <path id="circle2" d="M 375 125 A 75 75 360 1 1 374.999 125" style="stroke: none; fill: none;"/>
  <text style="font-size: 12pt;" transform="translate(0 -80) rotate(-90 450 200)">
      <textPath xlink:href="#circle2">
            This is a test. This is a test. This is a test.
      </textPath>
  </text>
  <text style="font-size: 12pt;" transform="translate(-200 0)">
      <textPath xlink:href="#circle2">
            This is a test. This is a test. This is a test.
    </textPath>
  </text>
</svg>



text on bent line

<svg>
<path id="meander" d="M 100 200 L 300 100 H 350 L 450 300" style="fill: none; stroke: none;"/>
<text style="font-size: 12pt;" >
  <textPath xlink:href="#meander">
    This is a test. This is a test. This is a test.
  </textPath>
</text>
</svg>