SVG text not rendered under Mac OSX

Having trouble installing <oXygen/>? Got a bug to report? Post it all here.
expatriate
Posts: 39

SVG text not rendered under Mac OSX

Fri Apr 10, 2015 8:18 pm

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
adrian
Posts: 2385

Re: SVG text not rendered under Mac OSX

Fri Apr 10, 2015 10:17 pm

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
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
expatriate
Posts: 39

Re: SVG text not rendered under Mac OSX

Mon Apr 13, 2015 8:59 pm

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
expatriate
Posts: 39

Re: SVG text not rendered under Mac OSX: diagnosis

Mon Apr 13, 2015 10:21 pm

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
Radu
Posts: 5376

Re: SVG text not rendered under Mac OSX

Tue Apr 14, 2015 4:41 pm

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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Radu
Posts: 5376

Re: SVG text not rendered under Mac OSX

Wed Apr 15, 2015 11:01 am

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/Editor/MacOSX/VM/oxygen.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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
expatriate
Posts: 39

Re: SVG text not rendered under Mac OSX

Sun May 31, 2015 10:37 am

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
george
Site Admin
Posts: 2100

Re: SVG text not rendered under Mac OSX

Sun May 31, 2015 9:50 pm

Hi Pat,

It is, see
http://oxygenxml.com/download_oxygenxml_editor.html?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/MacOSX/VM/oxygen.tar.gz

Best Regards,
George
George Cristian Bina
expatriate
Posts: 39

Re: SVG text not rendered under Mac OSX

Tue Jun 02, 2015 6:04 pm

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
adrian
Posts: 2385

Re: SVG text not rendered under Mac OSX

Tue Jun 02, 2015 7:41 pm

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
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
adrian
Posts: 2385

Re: SVG text not rendered under Mac OSX

Wed Jun 03, 2015 12:32 pm

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
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Radu
Posts: 5376

Re: SVG text not rendered under Mac OSX

Wed Jun 03, 2015 2:33 pm

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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
expatriate
Posts: 39

Re: SVG text not rendered under Mac OSX

Mon Jul 06, 2015 6:13 pm

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
Radu
Posts: 5376

Re: SVG text not rendered under Mac OSX

Tue Jul 07, 2015 8:15 am

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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
expatriate
Posts: 39

Re: SVG text not rendered under Mac OSX

Tue Jul 07, 2015 4:20 pm

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

Return to “Common Problems”

Who is online

Users browsing this forum: No registered users and 0 guests