/** * Note: the koefficient is just a magic number; I'll need to examine the * imagefttext behavior more closely */ function stringwidth($string, $name, $encoding, $size) { $font = $this->_font_factory->getTrueType($name, $encoding); return Font::points($size, $font->stringwidth($string)) * 1.25; }
function _show_linethrough($x, $y, $width, $height) { $up = Font::points($this->fontsize, $this->currentfont->linethrough_position()); $ut = Font::points($this->fontsize, $this->currentfont->underline_thickness()); $this->_show_line($x, $y, $width, $height, $up, $ut); }