RE: Text 'width' and 'height' [was: Happy New Year SVGers]

Gaetan,
I just responded to Jan's request. My response will probably disappoint you.

Just to make sure that we understand your requireements:

1) Do you want/need SVG to do text wrapping within a particular,
well-defined rectangular area?
2) Do you want/need SVG to have objects grow based on the size of the text
within the object (e.g., a rectangle whose size depends on the dimensions
of text that is inside of the rectangle)?
3) What are your text alignment needs? The latest draft of SVG has
'text-anchor:start|middle|end', which provides for left/center/right
alignment of text relative to a particular point on the canvas (assuming
horizontal flowing text). For vertical alignment of horizontal flowing
text, you can use the 'glyph-anchor' property (might get a new name before
we are done), such as 'glyph-anchor: centerline'. These two properties give
you horizontal and vertical alignment facilities for a single line of text.
Do you need more capability than this for text alignment?

I'm asking these questions so that we can understand your particular
requirements. However, at this late date, significant changes to SVG 1.0
will meet with lots of resistance, so don't get your hopes up. (We had our
Last Call on August 12.)

Thanks.
Jon Ferraiolo
SVG Editor
Adobe Systems Incorporated

At 10:30 AM 1/11/00 +0100, Gaetan Frenoy wrote:
>
>	Hi all,
>
>	We are also converting our existing language into a SVG-compatible
> language.  I have almost done the job too.
>
>	Unfortunatly, I have big big bIIIIg troubles to match our
> existing texts with the syntax of SVG.
>
>	Our texts are always defined within a rectangle box and
> an alignment policy into this box (eg: center/middle or bottom/right).
>
>	I've searched for hours into the SVG specifications to find
> something that could match this need without any valuable result :(
>
>	I think this can be a drawback for SVG in the future and
> I'm joining Jan to ask to the SVG comittee to provide a solution to
> this problem.
>
>	Thank you,
>
>--
>Gaëtan Frenoy (aka Gaff) 
>Aspen Technology, Inc.
>AspenTech Nivelles - 20, rue de l'industrie - 1400 Nivelles
>Tel : 32-67-88.36.66 - Fax: 32-67-88.36.88
>e-mail: mailto:gaetan.frenoy@aspentech.com
>web site: http://www.aspentech.com
>
>
>
>> -----Original Message-----
>> From: Jan Aarsaether [mailto:jaa@metis.no]
>> Sent: Tuesday, January 11, 2000 10:16 AM
>> To: Chris Lilley
>> Cc: www-svg@w3.org
>> Subject: Text 'width' and 'height' [was: Happy New Year SVGers]
>> 
>> 
>> 
>> Chris Lilley wrote:
>> > I just wanted to wish all SVG users and implementors a Happy New
>> > Vectorial Year,
>> 
>> Likewise :->
>> 
>> > and keep those reports of new or updated implementations, use cases,
>> > examples, and any sort of spec feedback coming in!
>> 
>> SVG is a big language (there must be a loooooot of people on the SVG
>> committee :-) with lots of alternative ways of doing the same thing.
>> But we are now getting close to finishing the job of converting our
>> symbol format into SVG. However, we're having trouble with the <text>
>> element.
>> 
>> We are not just rendering vector symbols, but creating primitives
>> which the user can modify interactively using our symbol editor. In
>> the <text> case, it is even possible for the system to change the
>> content of the text whenever properties/criteria change (macros).
>> Because of this, it is common to 'reserve' a certain rectangular space
>> for the <text> element to fit into the rest of the symbol and our
>> system does wrapping and clipping within this rectangle before
>> painting the primitive.
>> 
>> But, SVG only specifies 'x' and 'y' attributes on <text>. We need
>> 'width' and 'height' (similar to the <rect> element) to be able to
>> persistently store our information using SVG. This is especially
>> important with 'right' and 'bottom' adjusted texts. We also use the
>> rectangle actively by allowing the user to control the background
>> color, but we can do without this feature.
>> 
>> We realize that (most?) SVG renders can do without these additional
>> attributes, but I would expect other applications to have similar
>> needs as described above. Has anybody stumbled upon this before? Is
>> there any chance of appending this to the SVG specs? If not, we would
>> have to resort to some kind of hack :-< Or maybe there is some way of
>> doing this in the existing specs which we haven't found. Tips and
>> feedback would be highly appreciated!
>> 
>> ---
>> Jan Aarsaether			jaa@metis.no
>> METIS GUI Development	
>> NCR Norge AS
>> 
> 

Received on Tuesday, 11 January 2000 11:20:15 UTC