Lines Matching +defs:text +defs:color
10 * @see http://stackoverflow.com/questions/7742148/how-to-convert-text-to-svg-paths
28 $this->font->color = '';
77 * @param string $color
79 public function setFont($filepath, $size, $color)
83 $this->setFontColor($color);
97 * Set font color
98 * @param string $color
101 public function setFontColor($color)
103 $this->font->color = $color;
196 * Add a text to the SVG
203 public function addText($text, $x = 0, $y = 0, $attributes = [])
205 $def = $this->textDef($text);
211 if ($this->font->color) {
212 $attributes['fill'] = $this->font->color;
220 * @param string $text UTF-8 encoded text
221 * @return string xml for text converted into SVG paths
223 public function textDef($text)
230 $text = $this->utf8ToUnicode($text);
231 $counter = count($text);
234 $letter = $text[$i];
260 * Function takes UTF-8 encoded string and size, returns width and height of the whole text
261 * @param string $text UTF-8 encoded text
264 public function textDimensions($text)
267 $text = $this->utf8ToUnicode($text);
274 $counter = count($text);
277 $letter = $text[$i];