/** * Function caluclulate the length of a fixed width string * @param string $string the string we wish to calculate the length of * @param bool use_font_size default false -- * @returns float the length of the string */ protected function getFixedStringWidth($string, $use_font_size = false) { if ($this->direction != -1) { return $this->font_metrics[$this->direction]->getFixedStringWidth($string, $use_font_size); } else { return parent::getFixedStringWidth($string, $use_font_size); } }