SVG – Learning by Coding

[ textLength.svg --> Grafik anzeigen ]

 1: 
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
 2: 
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"

 3: 
  "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd" [

 4: 
  <!ATTLIST svg xmlns:xlink CDATA #FIXED "http://www.w3.org/1999/xlink">

 5: 
  <!ENTITY tt "Das ist ein Testtext">

 6: 
]>

​ 7:  8: 
<!-- SVG Learning by Coding http://www.datenverdrahten.de/svglbc/ -->

 9: 
<!--    AuthorDrThomas Meinike 09/03 thomas@handmadecode.de     -->

​10: 11: 
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">

​12: 13: 
  <title>SVG Learning by Coding</title>

14: 
  <desc>SVG-Spezifikation in Beispielen</desc>

15: 
  <defs>

16: 
    <style type="text/css">

17: 
    <![CDATA[

​18: 19: 
    text

20: 
    {

21: 
      font-size14px;

22: 
    }

​23: 24: 
    text.tt1

25: 
    {

26: 
      fill#000;

27: 
    }

​28: 29: 
    text.tt2

30: 
    {

31: 
      fill#F00;

32: 
    }

​33: 34: 
    text.tt3

35: 
    {

36: 
      fill#090;

37: 
    }

​38: 39: 
    text.tt4

40: 
    {

41: 
      fill#00C;

42: 
    }

​43: 44: 
    ]]>

45: 
    </style>

46: 
  </defs>

47: 
  <text x="20" y="30" style="fill: #000; font-size: 24px">

48: 
    Attribute textLength und lengthAdjust</text>

​49: 50: 
  <text class="tt1" x="20" y="60">&tt;</text>

​51: 52: 
  <text class="tt2" x="20" y="80" textLength="80">&tt;</text>

​53: 54: 
  <text class="tt3" x="20" y="100" textLength="80"

55: 
    lengthAdjust="spacing">&tt;</text>

​56: 57: 
  <text class="tt4" x="20" y="120" textLength="80"

58: 
    lengthAdjust="spacingAndGlyphs">&tt;</text>

​59: 60: 
  <line x1="20" y1="140" x2="420" y2="140"/>

61: 
  <image xlink:href="bilder/textLength.gif" x="20" y="150" width="307" height="161"/>

​62: 63: 
</svg>

[zum Anfang]