Re: boustrophedon: should I bother with abiword?


Subject: Re: boustrophedon: should I bother with abiword?
From: Andrew Dunbar (hippietrail@yahoo.com)
Date: Wed May 23 2001 - 23:58:46 CDT


Dom Lachowicz wrote:
>
> Hi,
>
> Oh, so this is what you want :-)
>
> Please compile AbiWord with ABI_OPT_BIDI_ENABLED=1 (make clean realclean
> first, though).
>
> This'll enable Abi to do BiDirectional text like how you want (hebrew,
> etc..) I suggest getting Abi from CVS because now you can import MSWord
> DOCs with BiDi text in them. IIRC, Tomas has also fixed a few bugs since
> 0.7.14 too.
>
> Please try this out and see if it meets your needs. If it doesn't, we'd
> like to see any other features added to AbiWord too. It shouldn't be too
> hard to do.
>
> Dom
>
> On 23 May 2001 18:05:50 -0600, Simmon Keith wrote:
> > Okay. I only got one (short) response to my font question. I guess I'll
> > expand... I need a cross-platform word processor (Linux, Windows, Mac) that
> > will not only function normally, but also have a mode/tag that writes text
> > right-to-left/'backwards' (this could be handy for writing Hebrew).
> >
> > Here's where it actually gets tricky: It primarily needs to be able to write
> > boustrophedonically (back-and-forth). (I also might add a mode for Rongorongo
> > -- which goes back and forth like boustrophedon, but *rotates* the characters
> > on the "backwards" lines instead of just making them face leftward).
> >
> > I wrote a tcl/tk program that formatted text files this way. But there was no
> > support for multiple fonts (I had a static font, with two copies: forward &
> > backward). No bold, italic, underline or the like. I also had no facility
> > for tweaking the formatting (deciding how many blank lines to put between
> > paragraphs, deciding whether it's appropriate to change direction on a new
> > paragraph, changing margins, full justification(?)). I also never tackled
> > proportional-width fonts...
> >
> > My Question Is:
> > Is it even possible to modify AbiWord to give me this behavior? If so, is
> > it *practical* to do so? Sure, a lot of the wp stuff is already done for me,
> > but might it not be more difficult to modify than it would be to start from
> > scratch; should I give up on Abiword and explore other venues for getting my
> > project where it needs to be?

This is more complicated than you imagine. HTML and MS Word allow you
to mark sections of text to force them into right-to-left behaviour.
I think even RTF has something like this.
Regular right-to-left or bidirectional implementations generally allow
for certains scripts (mainly Hebrew and Arabic) to render right-to-left
while any western text mixed in will render left-to-right. This
actually
requires a lot of rules and is specialized.

For boustrophedon rendering you need new algorithms that do much the
same thing but alternate the direction automatically every second line.
For Rongorongo as you describe it the situation is even worse since
you either need to flip each glyph as well.

As a hack you could create HTML and mark every second line manually
but you'll lose all the benefits of wordwrapping.

So my short answer is that it's way too difficult to implement
*properly* in AbiWord since almost nobody would use it.
Abi may support a way to mark text to force it into right-to-left
mode but I'm not familiar with Abi's bidi code. If it doesn't yet
it will probably have to at some point to match what HTML and Word
can do.

If you were a programmer you may be able to hack a quick and
dirty extension to do what you want but production quality would
be very difficult.

Andrew Dunbar.

-- 
http://linguaphile.sourceforge.net

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com




This archive was generated by hypermail 2b25 : Sat May 26 2001 - 03:51:07 CDT