<body> <div class="row"> <div class="col-xs-12"> <h1>EasySVG demo</h1> <?php $text = "Simple text display\netc."; $svg = new EasySVG(); $svg->setFontSVG("paris-bold-webfont.svg"); $svg->setFontSize(100); $svg->setFontColor('#000000'); $svg->setLineHeight(1.2); $svg->addText($text); // set width/height according to text list($textWidth, $textHeight) = $svg->textDimensions($text); $svg->addAttribute("width", $textWidth . "px"); $svg->addAttribute("height", $textHeight . "px"); echo $svg->asXML(); ?> <br/><br/><br/> <pre> $text = "Simple text display\netc."; $svg = new EasySVG(); $svg->setFontSVG("paris-bold-webfont.svg"); $svg->setFontSize(100); $svg->setFontColor('#000000'); $svg->setLineHeight(1.2); $svg->addText($text); // set width/height according to text