font problem - SVG to EPS or PDF working only as root user
Hello Inkscape users,
I'm having a strange issue i help you'll be able to help me fix. I'm currently using both inkscape 0.46 and 0.47 r22583, on two distinct linux servers.
I'm using it as a commandline tool, to convert vector files for an online application i'm developing. The problem is simple. I have command lines like these:
/usr/bin/inkscape -z file.svg --export-eps=file.eps --export-text-to-path /usr/bin/inkscape -z file.svg --export-pdf=file.pdf --export-text-to-path
If these commands are executed in shell as root, all is fine. But if executed via PHP "exec()" function, so as user Apache as i need it, the generated EPS or PDF files are created but without the correct font. Please note that i execute in cron every day the command "fc-cache -f /usr/share/fonts/ttf", and /usr/share/fonts/ttf contains all of the fonts i need.
It behaves just like the Apache user cannot access the system fonts library... so strange. Moreover, with a previous version of inkscape all was fine. So i'm just afraid there's something i need to set up at system level to grant Apache user access to system fonts by using inkscape. Any idea about what could cause this?
Just to provide some more info, here is an example of the SVG file i'm trying to convert, which basically is just a stroked text.
<svg width="24in" height="24in" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" shape-rendering="geometricPrecision" text-rendering="geometricPrecision" image-rendering="optimizeQuality" fill-rule="evenodd" clip-rule="evenodd" xmlns:xlink="http://www.w3.org/1999/xlink"> <rect x="0" y="0" width="24" height="24" style="fill: none;" /> <g transform="translate(12,12)"> <text id="text_3_1_check_s" transform="translate(0,0)" style=" text-anchor:start; font-size: 1; font-family: 'Unicorn'; fill: #E3478C; fill-opacity: 1; stroke: #000000; stroke-linecap: round; stroke-linejoin: round; stroke-opacity: 1; stroke-width: 0.027777777777778;">918-542-5348</text> <text id="text_3_1_check" transform="translate(0,0)" style=" text-anchor:start; font-size: 1; font-family: 'Unicorn'; fill: #E3478C; fill-opacity: 1;">918-542-5348</text> </g> </svg>
Thanks in advance,
Alex
participants (1)
-
Alexander Bonivento