Search notes:

SVG: styled text

The following simple example tries to demonstrate the combination of the <text> and <style> elements in SVG.
<svg
   xmlns="http://www.w3.org/2000/svg"
   viewBox="0 0 220 160"
>

  <style>

    .st1 { font: italic 20px sans-serif;
           fill: #fa3
         }

    .st2 { font: bold 30px serif;
           fill: #a4f
         }

  </style>

  <text x= "0"  y= "30" class="st1">Line one / style 1</text>
  <text x="30"  y= "60" class="st1">Line two / style 1</text>
  <text x="25"  y= "90" class="st2">Line three / style 2</text>
  <text x="60"  y="120" class="st2">Line four / style 2</text>

</svg>
Github repository about-svg, path: /elements/text/style.svg

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/design/g...', 1759415748, '216.73.216.42', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/design/graphic/svg/elements/text/style(61): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78