mirror of
https://github.com/Intervention/image.git
synced 2025-08-30 17:19:50 +02:00
Update Font.php
This commit is contained in:
committed by
GitHub
parent
d5611555bf
commit
5f5ab3b0d1
@@ -82,6 +82,11 @@ class Font extends \Intervention\Image\AbstractFont
|
|||||||
|
|
||||||
if ($this->hasApplicableFontFile()) {
|
if ($this->hasApplicableFontFile()) {
|
||||||
|
|
||||||
|
// imagettfbbox() converts numeric entities to their respective
|
||||||
|
// character. Preserve any originally double encoded entities to be
|
||||||
|
// represented as is.
|
||||||
|
// eg:   will render   rather than its character.
|
||||||
|
$this->text = preg_replace('/&(#(?:x[a-fA-F0-9]+|[0-9]+);)/', '&\1', $this->text);
|
||||||
$this->text = mb_encode_numericentity($this->text, array(0x0080, 0xffff, 0, 0xffff), 'UTF-8');
|
$this->text = mb_encode_numericentity($this->text, array(0x0080, 0xffff, 0, 0xffff), 'UTF-8');
|
||||||
|
|
||||||
// get bounding box with angle 0
|
// get bounding box with angle 0
|
||||||
|
Reference in New Issue
Block a user