title: Batik not rendering the correct font color?
body: <p>I'm using the Apache Batik Java library to convert <code>.svg</code> vector image file to a <code>.png</code> file. The problem is that the <strong>font colors</strong> of the generated <code>.png</code> image are all going black. Here is the code that I'm using to do the conversion:</p>
  
  <pre><code>import java.io.ByteArrayInputStream;
  import java.io.ByteArrayOutputStream;
  
  import org.apache.batik.transcoder.TranscoderInput;
  import org.apache.batik.transcoder.TranscoderOutput;
  import org.apache.batik.transcoder.image.PNGTranscoder;
  
  public class SVGHelperDesktop extends SVGHelper {
      @Override
      public byte[] convertSvgToPng(String svgXml, float png_width)
              throws SVGConversionException {
          byte[] resultPngBytes = null;
  
          try {
              ByteArrayInputStream inputSvgBytes = new 
                      ByteArrayInputStream(svgXml.getBytes());
              TranscoderInput input_svg_image = new 
                      TranscoderInput(inputSvgBytes);
  
              ByteArrayOutputStream outputPngBytes = new ByteArrayOutputStream();
              TranscoderOutput output_png_image = new TranscoderOutput(outputPngBytes);
  
              PNGTranscoder svgToPngConverter = new PNGTranscoder(); 
              svgToPngConverter.addTranscodingHint(PNGTranscoder.KEY_WIDTH, png_width);
              svgToPngConverter.transcode(input_svg_image, output_png_image);
  
              resultPngBytes = outputPngBytes.toByteArray();
  
              outputPngBytes.flush();
              outputPngBytes.close(); 
          } catch (Exception e) {
              throw new SVGConversionException("Error converting SVG to PNG", e);
          }
  
          return resultPngBytes;
      }
  }
  </code></pre>
  
  <p>Using the <a href="http://bigbadaboom.github.io/androidsvg/" rel="nofollow noreferrer"><code>AndroidSVG</code> library</a> on the same <code>.svg</code> file generates the correct <code>.png</code> image with the correct colors.</p>
  
  <p>Another note; Using the default font of <code>inkscape</code> (the program I use to create vector graphics) solves this problem. Using any other font face causes Batik to change its colors to black.</p>
  
  <p><a href="http://pastebin.com/XmLwKdWd" rel="nofollow noreferrer">Here's a link to my SVG file.</a></p>