|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #70488 GMagick fails to render Google Fonts in SVG
Submitted: 2015-09-14 09:51 UTC Modified: -
Avg. Score:3.0 ± 0.0
Reproduced:0 of 1 (0.0%)
From: sayan dot engineer at gmail dot com Assigned:
Status: Open Package: gmagick (PECL)
PHP Version: Irrelevant OS: Ubuntu
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: sayan dot engineer at gmail dot com
New email:
PHP Version: OS:


 [2015-09-14 09:51 UTC] sayan dot engineer at gmail dot com
My Ubuntu 14.04 laptop has GraphicsMagick and the PHP extension (GMagick) installed. When I run the following from the command line,

gm convert -font /usr/share/fonts/truetype/google-fonts/RockSalt.ttf svg_file.svg jpeg_file.jpg

renders the JPEG with the font as desired. However, the PHP code fails to do the same and creates a JPEG with a default font. What could be the issue here?

This is the SVG:

<?xml version="1.0"?><svg xmlns=""    xmlns:svg="" xmlns:xlink="" width="737" height="521"><defs/> <g class="main">  <title>Main</title>  <rect fill="#ffffff" stroke-width="0" x="27.24188" y="429.44421" width="682.51626" height="68.18413" id="svg_2" class="element" opacity="0.75" stroke="#000000"/>  <g text-anchor="start" font-family="Rock Salt" fill="#000" font-size="20" class="element textarea" id="svg_3">   <rect opacity="0"  stroke-width="0" x="27.24188" y="429.44421" width="682.51626" height="68.18413" id="svg_4"/>   <g class="textGroup">    <text class="eol" y="470.98331" x="44.46314" xml:space="preserve">Your&#xA0;memories&#xA0;will&#xA0;last&#xA0;forever</text>   </g>  </g> </g></svg>

Test script:
$gm = new Gmagick();
$draw = new GmagickDraw();


Add a Patch

Pull Requests

Add a Pull Request

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Apr 21 00:01:28 2024 UTC