Hi Matthew,
"Matthew Darlison" <[EMAIL PROTECTED]> wrote on 08/29/2007 05:56:36 AM:
> On 28 Aug 2007 at 21:22, [EMAIL PROTECTED] wrote:
> > What version of Batik are you using?
>
> I've verified and rebuilt, and I'm using JDK 1.6 and the result of the
> all-jar target on a current pull of the SVN repository.
Ok.
> > > I'm getting great output quality, but large files because the
default
> > > export renders the entire outlines of the text to paths, rather than
the
> > > text itself.
> >
> > There are a number of ways that this can happen. How are you
drawing
> > the text? (what method is being used on the Graphics2D?).
>
> An example would be:
> ...
> LineBreakMeasurer slbm = new LineBreakMeasurer(saci, sfrc);
> float swrappingWidth = (this.getXDimension()/4)-offsetunit;
> float sx = offsetunit;
> float sy = rowcentre1 -offsetunit;
> while (slbm.getPosition() < saci.getEndIndex()) {
> TextLayout stextLayout = slbm.nextLayout(swrappingWidth);
> sy += stextLayout.getAscent();
> stextLayout.draw(g2, sx, sy);
> sy += stextLayout.getDescent() + stextLayout.getLeading();
> sx = offsetunit;
> }
I'm guessing that the LineBreakMeasurer is setting a
bunch of attributes on the attribute string that it passes
to the Graphics2D to draw. The list of attributes that we
check for an fallback to outlines for is:
unsupportedAttributes.add(TextAttribute.BACKGROUND);
unsupportedAttributes.add(TextAttribute.BIDI_EMBEDDING);
unsupportedAttributes.add(TextAttribute.CHAR_REPLACEMENT);
unsupportedAttributes.add(TextAttribute.JUSTIFICATION);
unsupportedAttributes.add(TextAttribute.RUN_DIRECTION);
unsupportedAttributes.add(TextAttribute.SUPERSCRIPT);
unsupportedAttributes.add(TextAttribute.SWAP_COLORS);
unsupportedAttributes.add(TextAttribute.TRANSFORM);
unsupportedAttributes.add(TextAttribute.WIDTH);
Of these I would suspect that BIDI_EMBEDDING, and
perhaps JUSTIFICATION/RUN_DIRECTION/WIDTH are tripping
you up. I would suggest commenting them out of your local
copy of SVGGraphics2D and see if it fixes it. The list
is at the end of batik.svggen.SVGGraphics2D.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]