[prev in list] [next in list] [prev in thread] [next in thread] 

List:       batik-users
Subject:    Re: SVG 1.2, margins, and squiggle
From:       thomas.deweese () kodak ! com
Date:       2006-01-26 0:23:40
Message-ID: OF1A68046E.2D076580-ON85257102.00017CC4-85257102.00022A62 () knotes ! kodak ! com
[Download RAW message or body]

Hi Christopher,

ctimko@cs.uiowa.edu wrote on 01/25/2006 04:17:55 PM:

> I'm currently attempting to build some SVG powerpoint type slides, and I 
have a
> question about margins and the method that squiggle uses to render these
> margins.  I'm currently using the exensions version of squiggle because 
I'm
> using the text flowing properties, but I can't seem to get the margin to 
render
> correctly.  Below is the a sample of a slide.

   You really want to use the 'flowRoot' stuff from SVG 1.2.
There are a number of examples in samples/tests/spec12/text in
the Batik source dist.  Mostly all you need to do to switch is:

> <svg xmlns="http://www.w3.org/2000/svg" width="720"
> xmlns:xlink="http://www.w3.org/1999/xlink" height="540">

        Add 'version="1.2"' to the outermost 'svg' element.

>    <flowText xmlns="http://xml.apache.org/batik/ext">

        Change this to 'flowRoot' and drop the xmlns decl.

> Now, note <flowPara font-family="Times New Roman" font-size="32"
> margin-left="50" indent="-23">.  According to the SVG group on yahoo, a 
margin
> attribute for used in a flow text type construction must appear in the 
flowPara,
> not the flowDiv.  When I change "margin-left" to "margin", I get a 
margin, but
> it places this margin on each side of the paragraph.  Does anyone know 
if
> squiggle can only place a margin on one side of a pargraph, and do I 
need to
> assign a different attribute other than "margin-left"?

    If you really want to stay with flowText I misnamed these as 
'left-margin'
'top-margin' etc.  Also they are just attributes not CSS properties. 
Finally 
flowText only supports flowing into rects (flowRoot supports arbitrary 
geometry 
for flow containers), the flowRoot stuff has much better word breaking, 
etc.

    Good luck!

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic