Re: LANG as an attribute

Anoosh Hosseini (anoosh@gorgan.mti.sgi.com)
Tue, 1 Aug 95 16:37:26 EDT

On Aug 1, 6:25am, lilley wrote:
> Subject: Re: LANG as an attribute
> Jon Bosak said:
>
> > Note that we're talking specifically about embedding a fragment of a
> > right-to-left language like Hebrew or Arabic in the middle of a
> > passage written in a left-to-right language like English or Spanish.
>
> Yes. Understood.
>
> Now, let us presupose routines already exist to lay out a line of type
> left to right and to put fully rendered lines onto the output device.
>
> Let us arbitrarily represent, in this example, Hebrew letters as some entity
> set, as much for convenience in email as anything else.

You are cheating, Hebrew is simpler to support than Arabic.

>
> Let us also suppose that we have a full, scalable unicode font at our
> disposal - because the issue was setting bidi type, not handling missing
> fonts.
>

OK

> The input text is being streamed in and we cannot look ahead. Actually
> we could probably look ahead with a small amount of buffering but lets
> try without first.
>
> The line under construction so far is:
>
> left^--------------------------------^right margins
> is expressed in Hebrew a
> ^========== insert point
>
> Next letters are s and space
>
> left^--------------------------------^right margins
> is expressed in Hebrew as
> ^========== insert point

In the case of WWW where we only display rather than edit, the insert point
is less important. We may deal with the layout as segments of text which have
a particular direction. We can use standard bidi algorithm for processing
text.
What is left is Images and their orientation (inherit direction from block?)
and also elements such as <UL><LI>english <LI> Arabic <LI>Hebrew <LI> Spanish.
</UL>. Are the bullets left aligned or right aligned?
Finally character and language/font issue. Specially if one is going to
use Unicode, a LANG parameter is required to inform the browser whether to
use Persian or Arabic or Urdu style fonts to display characters shared
among the three languages.

For a "real" implementation grab the localized Mosaic with Persian and
Arabic support from ftp://tehran.stanford.edu/Iran_Lib/PMosaic. There are
atleast 2 Persian newspapers published on the Web today that take advantage of
it.

docs are at

http://gpg.com/pmosaic/

enjoy.

-anoosh

> --
> Chris Lilley, Technical Author