You are here

function _textimage_measure_text_width in Textimage 7.3

Measure text box width.

Parameters

object $image: Image object.

string $text: Text string in UTF-8 encoding.

int $lines: The number of lines the text is composed of.

int $font_size: Font size.

string $font_uri: URI of the TrueType font to use.

Return value

array An associative array of box measurements.

1 call to _textimage_measure_text_width()
_textimage_wrap_text in effects/textimage_text.inc
Wrap text for rendering at a given width.

File

effects/textimage_text.inc, line 1372
Implementation of the 'textimage_text' image effect.

Code

function _textimage_measure_text_width($image, $text, $lines, $font_size, $font_uri) {
  $box = _textimage_get_bounding_box($image, $text, $lines, $font_size, $font_uri);
  return $box
    ->get('width');
}