/** * Get the bounding text box for a text string and an angle * * @param $text * @param int $angle * * @throws Exception * @return \Imagine\Image\BoxInterface */ public function getTextBox($text, $angle = 0) { if (empty($this->_font)) { throw new Exception(Craft::t("No font properties have been set. Call Image::setFontProperties() first.")); } return $this->_font->box($text, $angle); }
private function getWidthOfSpaceChar(ImagineFont $font) { return $font->box(' ')->getWidth(); }