Hi Cameron , I tried to download flowText.svg and resource/style/test.css,
I download above files to local pc and tried to use batik convert to jpg, It is doing ok, however, why css's font don;t work correctly? I changed font to , of course I did put that font in D:\Java\jre6\lib\fonts, but everytime textflow only convert to system default's font such as arial. Thanks in advance. http://svn.apache.org/repos/asf/xmlgraphics/batik/trunk/samples/tests/spec12/text/flowText.svg Cameron McCormack-4 wrote: > > Hi Andy. > > Andy Hall: >> I'm currently writing a small Java tool for generating SVG files from >> a set of data. At the moment I have am generating the SVG in a >> rather naive way, by sticking data values into a SVG template, which >> works well enough for the structures I'm generating. However I will >> need to add text to the images, more specifically variable length >> lines of text. I require this text to be word wrapped within a >> defined area and for separate blocks of text to be stacked on top of >> each other. >> >> I've been planning on using Batik's swing component for the purpose >> of previewing these images, but I was wondering if I would be able to >> solve my text problem with Batik's other components. >> >> I'd be really grateful if someone could point me in the right direction. > > You have two choices for laying out text in SVG. The first is to write > some script that will determine the linebreaks and lay out the text > manually. For a greedy text layout (try to put the next word on the > line, and if it overflows the desired maximum line width, put a line > break there) this is not too hard. This will be compatible with other > SVG 1.1 implementations. > > Alternatively, you can use Batik’s flowText support. Here’s an example: > > > http://svn.apache.org/repos/asf/xmlgraphics/batik/trunk/samples/tests/spec12/text/flowText.svg > > Note that this syntax for flowing text comes from a draft of SVG 1.2 > Full, which will likely change at some point. > > Cameron > > -- > Cameron McCormack, http://mcc.id.au/ > xmpp:[EMAIL PROTECTED] ▪ ICQ 26955922 ▪ MSN [EMAIL PROTECTED] > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Text-layout-with-Batik-tp8928258p18886594.html Sent from the Batik - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
