Lines Matching refs:text
398 $text = implode("\n", $text_lines);
408 $text = mb_convert_encoding($text, 'EUC-JP', 'UTF-8');
419 $text
514 * @param string $text
519 protected function fitTextToPixelWidth(string $text, int $pixels): string argument
521 while ($this->textWidthInPixels($text) > $pixels) {
522 $text = mb_substr($text, 0, -1);
525 while ($this->textWidthInPixels(' ' . $text . ' ') < $pixels) {
526 $text = ' ' . $text . ' ';
530 return rtrim($text);
534 * @param string $text
538 protected function textWidthInPixels(string $text): int argument
544 $text = mb_convert_encoding($text, 'EUC-JP', 'UTF-8');
547 $bounding_box = imagettfbbox(self::TEXT_SIZE_POINTS, 0, self::FONT, $text);