Hi Pascal, Pyonpyon,

Pascal Sancho <pascal.sancho@takoma.fr> wrote on 01/11/2010 10:29:20 AM:

> I think that text-align is not a valid SVG property.
> The right property is text-anchor, witch is yet in your CSS style.
>
> FYI, text-anchor can get one of the following values: start | middle |
> end | inherit <
http://www.w3.org/TR/REC-CSS2/cascade.html#value-def-inherit>

   You are correct Pascal, the problem is that Batik implemented text-align
for text wrapping.  When that was done the values start, middle, end were
used as it was my understanding that these were/are preferable to
'left', 'center', 'right'. IIRC 'left' would actually mean 'right' for Right
to Left languages (like Arabic and Hebrew).

   For PyonPyon, I'm not sure what option would be best.  The simplest
thing would be to simply 'fix' the attribute before handing it to Batik.
Other options would be to modify Batik to support left, center, right and
map them internally.  The class that handles this attribute is:
        batik.css.engine.value.svg12.TextAlignManager

> pyonpyon a écrit :
> > Hi !
> >
> > First, I'm sorry if I'm doing this wrong I'm not used to this kind of
> > support (and also if my English is not good :p).
> >
> > I want to generate an image from an SVG source but I have this error :
> >
> >     The attribute "style" represents an invalid CSS declaration
> >     ("font-size:48.71988678px;font-style:normal;font-
> variant:normal;font-weight:normal;font-stretch:normal;text-
> align:center;line-height:125%;writing-mode:lr-tb;text-
> anchor:middle;fill:#ffffff;fill-opacity:1;stroke:none;font-
> family:JaneAusten;-inkscape-font-specification:JaneAusten").
> >
> >     Original message:
> >
> >     The "center" identifier is not a valid value for the "text-align"
> >     property.
> >
> >
> > I have a success message after but the render is not as expected (a
> > part of the image is white instead of black).
> > If I replace all the "text-align:center" by "text-align:middle", it works.
> >
> > The SVG image is created by Inkscape (under Mac OS), with a "SVG
> > Simple" format (I think this is the french version, but I suppose it
> > is the same in English).
> >
> > Is there something I'm doing wrong ?
> >
> > Thanks in advance !
> >
> > Aline
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
>