Hi Thomas,

Thomas DeWeese wrote:

Hi Vladimir,

Vladimir Bulatov wrote:

......
  I'm not sure I fully understand what you mean by
'pass text strings directly to print driver'.  This is
Java we never talk to something as low level as a driver.
We do talk to Java's implementation of Graphics2D for Print.
> _Most_ of our text is drawn using 'drawGlyphVector'  in
> cases where the text is stroked, or based on an SVG Font
> we may draw shapes to the Graphics2D.

I understand this. In reality Graphics2D rasterises text, which
it does bad in case of low resolution raster we have (20 dpi).
However, if simple text output is used it may actually pass
text directly to system (windows) to render it and system
passes it to our printer driver. But this is not my main concern.
My main concern is where to insert my special rendering code to
be compatible with Batik architecture.


If you want to 'reimplement' text most of the work is done by the SVGTextElementBridge in the org.apache.batik.bridge package. However if all you want to do is extract the text from the document I wouldn't bother with Batik I would just use a little XSLT - so I imagine you want something more than just "text strings".

Just text extraction is not an option. We are working on graphics, which represent information, like data plots, maps, diagrams. So, actual rendering of the shapes is important. I looked into SVGTextElementBridge already. I traced down text rendering to intresting method: org.apache.batik.bridge.BridgeContext.setTextPainter(TextPainter textPainter); It looks like this is the place to change text renderer implementation. But this method is not used anywhere in Batik and I am wondering what was the initial intent to have this method.


That all said my initial response on how to modify output for braille would be to use something like a user style sheet, with an '@media braille' rule. The Batik browser allows you to set the CSS Media in use for display.


Can you explain a little more. What happens if I will use '@media braille' in CSS? Will rendering be done by something else. How I implement rendering for that rule? Is it possible to use different rules for printing and for monitor?

Vladimir






--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to