You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by Bill Haneman <Bi...@ireland.sun.com> on 2000/11/21 18:13:01 UTC

Text attribute support

Hi:

I think we're agreed that it's not a good time to add new features.

But I may still ask a couple of feature-ish questions ;-)

I am trying to find the limits to what we can currently do with 
text.  Short of adding more than one or two lines of new code, 
there may still be some things we can do (features that are in
TextLayout already, that map well onto SVG text properties,
so only 1-2 lines would be needed in the bridge to add
the appropriate TextAttributes into the ACI.)

I'd like to show off at least a little bit of BIDI/
alternate text layout stuff, TextLayout supports the
following relevant attributes:

TextAttribute.BIDI_EMBEDDING
TextAttribute.RUN_DIRECTION : 
    possible values RUN_DIRECTION_LTR, RUN_DIRECTION_RTL
    (these map well onto 'writing-mode', I think)
    
TextAttribute.SUPERSCRIPT
    values SUPERSCRIPT_SUB, SUPERSCRIPT_SUPER

As far as I know, 'writing-mode' is not a CSS attribute.  Where in the
bridge do I go to find our support for non CSS attributes (not in "style", 
but as Stylable SVG ) ?

I am hoping that this is straightforward to add, certainly
if it proves buggy or requires more than a couple of lines of code
I will leave it alone.

But it would be really nice to show off a little BIDI text, and I
have reason to believe that the selectio highlighting 
would be "correct" also.

-Bill

------
Bill Haneman +353 1 8199279
Ireland Desktop Engineering
Sun Microsystems Ireland Ltd.


Re: Text attribute support & [commit]

Posted by Stephane Hillion <St...@sophia.inria.fr>.
Bill Haneman wrote:

> As far as I know, 'writing-mode' is not a CSS attribute.  Where in the
> bridge do I go to find our support for non CSS attributes (not in "style",
> but as Stylable SVG ) ?

In fact it is a CSS property, but not supported until now.

> I am hoping that this is straightforward to add, certainly if it proves
> buggy or requires more than a couple of lines of code
> I will leave it alone.

It required just a couple of classes ;-).
You can now access 'lr', 'lr-tb', 'rl' ... like any other CSS property value.

--
    Stephane.