Hi Batik Users:
I am working on FOray, an XSL-FO implementation (www.foray.org) that uses
Batik for SVG tasks. Our code was forked from FOP about 3 years ago, and is
similar in many respects to the FOP/Batik PDF Transcoder. I recently got my
feet wet with Batik upgrading to Batik 1.6 and cleaning up our interfaces to
it. I would now like to add, if possible, the ability to handle fonts
embedded in an SVG document, specifically to parse them and then embed them
in PDF (for now) output. We have the basic infrastructure in place to do
that, but I have struggled to get access to the raw font data in the SVG
document.
The font content is embedded in the SVG as follows:
<style type="text/css">
<![CDATA[
@font-face{font-family:'Saturn';src:url("data:;base64,\
T1RUTwACAC ... (font data omitted for brevity)
... AAAQAAAAA=")}
]]>
</style>
Here is what I think I know:
1. I think the SVG document is in the correct general form. It was created
by Adobe Illustrator, and renders successfully in Internet Explorer 7.0.
2. SVGOMDocument throws a "not implemented" RuntimeException at
getStyleSheets().
3. SVGOMStyleElement throws a similar exception at getSheet().
4. SVGOMStyleElement throws an NPE somewhere in getCSSStyleSheet(). (I can't
tell exactly where with my current setup: The distribution object code does
not have line numbers compiled into it, so I can't walk through it with a
debugger).
5. I see the collection of GVTFont-related stuff that is available in the
text nodes, but don't see a way to get to the actual font data through that
means.
Questions:
1. Am I on the right track to try to get access to the StyleSheet instance?
2. Is there a document-level way to get to the style sheets for the
document, or do I need to walk the tree to find them?
3. Do you have any advice about the best way to get to that raw font data?
Thanks in advance for your help, and thanks for your efforts to make Batik
so useful.
Victor Mote
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]