Page 1 of 1

SVG text not rendered under Mac OSX

Posted: Fri Apr 10, 2015 8:18 pm
by expatriate
Using the latest build of Oxygen, I can't get simple text objects in SVG to render.

I'm not too sure when the problem appeared as I've often previously converted text to paths. In Inkscape 0.91 I'm now asking for font-family="Arial, Helvetica, sans-serif" and seeing nothing, even in very simple diagrams which render perfectly in common browsers.

Any ideas very gratefully received.
Pat

Re: SVG text not rendered under Mac OSX

Posted: Fri Apr 10, 2015 10:17 pm
by adrian
Hi,

What distribution of Oxygen for OS X are you using (.zip with Java 6 or .tar.gz with Java 8 )?
An easy way to find out is to check the Java version in Help > About, System properties, java.runtime.version.

Later Edit: There's one other thing I forgot to ask, are you using a Mac with Retina display?

Regards,
Adrian

Re: SVG text not rendered under Mac OSX

Posted: Mon Apr 13, 2015 8:59 pm
by expatriate
Hi Adrian
Thanks for your quick response, sorry for my slow one.
Distribution: .zip with Java 1.6.0_65-b14-466.1-11M4716
Mac yes, Retina display no -- and I'm using 3 different displays with the same effect on all.
Pat

Re: SVG text not rendered under Mac OSX: diagnosis

Posted: Mon Apr 13, 2015 10:21 pm
by expatriate
Hi Adrian,
After hours of experimentation I can offer a diagnosis, but no explanation.

It seems that Oxygen will not render styled text which has no "stroke" colour. Inkscape seems to give text every conceivable attribute EXCEPT stroke colour: "stroke: none;". This won't do for Oxygen, which will only render with "stroke:#000000;" and this looks bad (the stroke has thickness).

Opera, Firefox and Safari, though, are happy with stroke:none.

Pat

Re: SVG text not rendered under Mac OSX

Posted: Tue Apr 14, 2015 4:41 pm
by Radu
Hi Pat,

Oxygen uses the open source Batik library to render SVG.
If you can send us a sample SVG (support@oxygenxml.com) we could see if we could do anything on our side to improve the rendering.

Regards,
Radu

Re: SVG text not rendered under Mac OSX

Posted: Wed Apr 15, 2015 11:01 am
by Radu
Hi Pat,

Thanks for the samples. By default on Mac OSX Oxygen uses Java 1.6. We found problems in the past with the way in which the Batik SVG rendering library we use works with Java 1.6 on Mac:

https://issues.apache.org/jira/browse/BATIK-1069

I can reproduce your findings when Oxygen is run with Java 1.6 but the SVG seems to be better rendered when Oxygen is run using Java 1.8. We have a special kit of Oxygen 16.1 with Java 1.8 bundled here:

http://www.oxygenxml.com/InstData/Edito ... gen.tar.gz

Java 1.8 still has some bugs of its own so usually we recommend the Oxygen which works with Java 1.6 as being a more stable kit. But at least you can use the other kit to test how SVGs are rendered.

Regards,
Radu

Re: SVG text not rendered under Mac OSX

Posted: Sun May 31, 2015 10:37 am
by expatriate
Hi Radu
This variant kit worked perfectly for me and I saw no other bugs comparable to the one it cured.
Now I've upgraded to Oxygen 17 and I'm back where I was. Will there be a Java 1.8 version for this one too?

Thanks
Pat

Re: SVG text not rendered under Mac OSX

Posted: Sun May 31, 2015 9:50 pm
by george
Hi Pat,

It is, see
http://oxygenxml.com/download_oxygenxml ... ?os=MacOSX
In the "Requirements" section we include a link to the installation kit that contains an embedded Java 8 JRE:
http://oxygenxml.com/InstData/Editor/Ma ... gen.tar.gz

Best Regards,
George

Re: SVG text not rendered under Mac OSX

Posted: Tue Jun 02, 2015 6:04 pm
by expatriate
Thanks, George.

Sadly this time the magic doesn't seem to have worked. Really simple images are not rendering correctly.

Batik's letting you down. Is there any other option to just viewing embedded SVG graphics outside oXygen?

Best wishes
Pat

Re: SVG text not rendered under Mac OSX

Posted: Tue Jun 02, 2015 7:41 pm
by adrian
Hello Pat,

Could you please send us a sample SVG file that you are having trouble with?
Please send it to support@oxygenxml.com.

In Author mode, if you double click an image (SVG or otherwise) it will be opened with the system application associated with that type of file (file extension). In this case, you just have to make sure that .svg is associated in your OS settings with an appropriate SVG viewer.

Regards,
Adrian

Re: SVG text not rendered under Mac OSX

Posted: Wed Jun 03, 2015 12:32 pm
by adrian
Hi,

We have tested and reproduced the issue with the file you provided. The version of Java does not seem to matter for this particular problem.
Unfortunately, not even the latest version of Batik, 1.8, does not address this issue.

We've logged the issue on our issue tracking tool and we'll also report it to the Apache Batik Project.

Regards,
Adrian

Re: SVG text not rendered under Mac OSX

Posted: Wed Jun 03, 2015 2:33 pm
by Radu
Hi Pat,

There is already an issue registered on the Batik issues list:

https://issues.apache.org/jira/browse/BATIK-1112

The problem is that your SVG contains Inkscape extensions in it, including in the CSS properties and Batik chooses to ignore all other CSS properties after such a property that it does not understand.

Have you tried to save the SVG from Inkscape without any inkscape-specific extensions in it?

Regards,
Radu

Re: SVG text not rendered under Mac OSX

Posted: Mon Jul 06, 2015 6:13 pm
by expatriate
Hi Radu
Once again, apologies for slow response.

Perhaps surprisingly, saving Inkscape drawings as Plain SVG does NOT fix the problem. Rendered text is still scattered unpredictably including, frustratingly, outside the viewport.

Any possibility of using an alternative renderer, even Inkscape's own?

Thanks
Pat

Re: SVG text not rendered under Mac OSX

Posted: Tue Jul 07, 2015 8:15 am
by Radu
Hi Pat,

We'll consider that. The problem is in finding a component which can be used independently, preferably open source and can convert SVG to another image format.

If you can share that SVG which still has issues with us we'll try to take a look at it.

Regards,
Radu

Re: SVG text not rendered under Mac OSX

Posted: Tue Jul 07, 2015 4:20 pm
by expatriate
Hi Radu
Thanks for finally tracking this one down. Inkscape’s “plain SVG” files till contain -inkscape-font-specification attributes. Tavmjong Bah has reported the continuing existence of -inkscape-font-specification, which is no longer necessary, as a bug but the bug status is still undecided.

Although saving as plain SVG and removing -inkscape-font-specification attributes does fix my issues, it’s not a viable workaround because the files still need to be Inkscape editable. For now I’ll just cope with Batik's scrambled approximations.

Best wishes
Pat