uawdijnntqw1x1x1
IP : 216.73.216.127
Hostname : toronto-dev2
Kernel : Linux toronto-dev2 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64
Disable Function : None :)
OS : Linux
PATH:
/
srv
/
users
/
craft4
/
apps
/
craft4-newsite-space
/
.
/
vendor
/
pixelandtonic
/
imagine
/
src
/
Gmagick
/
.
/
Font.php
/
/
<?php /* * This file is part of the Imagine package. * * (c) Bulat Shakirzyanov <mallluhuct@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Imagine\Gmagick; use Imagine\Driver\InfoProvider; use Imagine\Image\AbstractFont; use Imagine\Image\Palette\Color\ColorInterface; /** * Font implementation using the Gmagick PHP extension. */ final class Font extends AbstractFont implements InfoProvider { /** * @var \Gmagick */ private $gmagick; /** * @param \Gmagick $gmagick * @param string $file * @param int $size * @param \Imagine\Image\Palette\Color\ColorInterface $color */ public function __construct(\Gmagick $gmagick, $file, $size, ColorInterface $color) { $this->gmagick = $gmagick; parent::__construct($file, $size, $color); } /** * {@inheritdoc} * * @see \Imagine\Driver\InfoProvider::getDriverInfo() * @since 1.3.0 */ public static function getDriverInfo($required = true) { return DriverInfo::get($required); } /** * {@inheritdoc} * * @see \Imagine\Image\FontInterface::box() */ public function box($string, $angle = 0) { $text = new \GmagickDraw(); $text->setfont($this->file); /* * @see http://www.php.net/manual/en/imagick.queryfontmetrics.php#101027 * * ensure font resolution is the same as GD's hard-coded 96 */ $text->setfontsize((int) ($this->size * (96 / 72))); $text->setfontstyle(\Gmagick::STYLE_OBLIQUE); $info = $this->gmagick->queryfontmetrics($text, $string); $box = $this->getClassFactory()->createBox($info['textWidth'], $info['textHeight']); return $box; } }
/srv/users/craft4/apps/craft4-newsite-space/./vendor/pixelandtonic/imagine/src/Gmagick/./Font.php