🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: bit.software.international
Article #464

The Bilingual Latin/Arabic Supplement to X Window Applications

#464
From: Fethi AMARA
Date: Wed, 02 Jun 1993 16:13
504 lines
15559 bytes
CTI Concept Technology International













			   XLANGBOX FOR Arabic
		The Bilingual Latin/Arabic Supplement
			to X Window Applications












					Technical Product Description

							     May 1993




















_________________________________________________________________
Concept Technology International, - Nice Leader -
Le Centaure  66 - 68 Route de Grenoble - 06200 Nice France.
Tel. : (33).93.18.92.02 Fax : (33).93.18.92.04









        I-      Introduction

        II -    The XLANGBOX Environment

        III -   The XLANGBOX Standard Aspect





























_________________________________________________________________
* XLANGBOX is a  trademark of CTI s.a.r.l.
* UNIX is a trademark of AT&T.
* AIX is a trademark of IBM.
* OSF/Motif & Motif are trademarks of OSF
* XWindows is a trademark of MIT



					     Introduction(Cont'd)
_________________________________________________________________


Introduction
============

Background
==========

Arabic, as a calligraphic  language,  presents  major  processing
problems.

An Arabic character may take one, two,  or  sometimes  four  dif-
ferent  shapes,  yet it is represented by one code.  The shape of
the character is determined depending  on  its  position  in  the
word. This is but one problem.

Another problem is the direction of writing. Arabic text is writ-
ten from right to left. This conflicts with Latin, which is writ-
ten in the opposite direction. When mixing text languages,  char-
acters are added in one language and pushed in the other.

Some users speak only Arabic. They will not accept a cursor posi-
tioned  at the leftmost position of the screen. They want to have
an option allowing them to start at the rightmost position of the
line,  i.e., in brief, a mirror image of the screen. The implica-
tion is that, in this mode,  Latin  characters  are  pushed  from
right to left.

Yet one more complication: vocalization. These  characters,  like
their counterpart in Latin, the vowels, are a linguistic necessi-
ty, yet, in Arabic, they appear on top or below their  respective
consonants.

These linguistic complications -- and more -- make  Arabic a dif-
ficult language to handle.


Another aspect of the problem is  that  standard  UNIX  Operating
system support of Internationalization (local) supplies only sup-
port for European Languages generally based  on  the  ISO  8859-1
character codeset.

This National Language Support  (NLS)  allows  keyboard  mapping,
handling  of  collating  sequences  and character types, date and
time format.

It could also include, in the near future, a  specific  extension
for  the  Japanese language, but cannot handle Arabic characters,
and, in general "right-to-left" writing direction languages.

CTI is specialized in the design and the development of bilingual
and  multilingual Operating Systems. It has implemented bilingual
capabilities on a large number of machines operating under  UNIX,
XENIX, AIX, SUN/OS, ISC, .SINIX, DG/UX, EP/IX, CLIX...etc.


					     Introduction(Cont'd)
_________________________________________________________________


The Arabization of UNIX applications can be addressed in two main
ways :


For "Character based" applications that run  generally  on  ASCII
terminals (like ANSI, VT100, VT220, WYSE...), arabization process
can be achieved on the input/output character flow of the  termi-
nal  along  the TTY line.  The Arabic font is initially loaded on
the terminal local RAM.


The Transparency regarding (8 bits cleaned) applications  can  be
assumed.   The  application manages an 8 bit codeset (ISO 8859-6)
and the specific Arabic processing is done by the Operating  Sys-
tem TTY lowest level.


CTI designed and implemented "LANGBOX for Arabic" that provides a
global and transparent solution for this kind of applications.


With the development of Graphical Interface (like  X  Window)  on
Work  Stations,  other  kinds of applications have been designed.
These applications are clients that communicate  with  a  Graphic
Server through network connection facilities.

Here, the main application routines work  directly  with  bitmaps
and  the concept of character flow has disappeared. A transparent
Arabization is more difficult to implement. We need at  least  to
relink  the  application with an Arabic Graphical library, or use
an Arabic shared library at the runtime level (if  the  operating
system allows it). Also, some application concepts must be imple-
mented to allow a correct behavior.  For example, we always  need
to  refresh  the  complete line after each input character. More-
over, fonts could be selected through a Resource file or  a  com-
mand line option.

Even if all these features are present, parts of the  application
could  not behave correctly in Arabic (like cut and paste for ex-
ample), and, a specific implementation must be done for the  Ara-
bic support by adding specific source code lines.

XLANGBOX for Arabic package has been defined to allow Arabization
of pure X Window applications and allows the following features:

	* Providing a global solution to Arabic and Latin  simul-
          taneously.
	* Maximum Transparency of applications.
	* Total transparency  to  storage  and display of data in
          national languages.
	* Ease of internationalization of applications.
	* Conformity with national  and  international standards.


                                         The XLANGBOX Environment
_________________________________________________________________



The XLANGBOX Environment
========================

The XLANGBOX-ARA library package is build around the MIT X Window
and  OSF MOTIF libraries. When added and linked to an application
that uses these interfaces, XLANGBOX-ARA provides the user with a
full bilingual environment in runtime application operations.

The XLANGBOX-ARA  package  is  specially  designed  for  software
developers  willing  to address the Arab countries' market.  With
XLANGBOX-ARA, they can move a  standard  Latin  application  with
minor  changes.  As set of a demo and X Window samples, OSF MOTIF
and UIL program are arabized and included in the package.

Arabization level parameters can be selected and set at the  run-
time level.  These parameters could be either user independent or
in the application.  They include "context  analysis"  (automatic
shape  determination,  dual  keyboard  state and mapping, numeral
shapes, vowels)

The Arabic character set handled by XLANGBOX-ARA  is  ISO  8859-6
which  is the standard adopted by the International UNIX communi-
ty.

XLANGBOX-ARA is composed with the following parts:

        *       The Arabic Context Library
	*       The  XWindow  Arabic Extension
	*       The OSF MOTIF Arabic extension
	*       The  Arabic   fonts   for   the   server
        *       The Demo Set


These parts can be used together or separately depending  on  the
need  and the internal organization of the application to be ara-
bized.


1. The Arabic Context Library

This library contains the  specific  Arabic  string  manipulation
routines.  These routines allow the following:

	*  "Contextation" of ISO  8859-6 strings  coming  from  a
	   storage  area, and makes  it readable according to the
	   Arabic context (generally for a display purpose).

	*  Character position calculation: These  routines  allow
	   to locate the new position value for a character after
	   or before a contextation.

	*  Attribute range selection:  These  routines  allow  to
	   calculate a new attribute range of a  string  after or
	   before a contextation.

                                 The XLANGBOX Environment(Cont'd)
_________________________________________________________________




	*  "Contextation"  parameter  management:  These routines
	   allow  to  get or to set the specific Arabic parameter
	   used during  the "context  analysis" of strings. These
	   parameters  are  mainly the following:

	   The XLANGBOX Environment

		*     left to right / right to leftmain direction
		*     hindi/Arabic numeral shape
		*     Vowels enabled/disabled   (tashkil)
		*     Automatic shape determination on-off
		*     Data  processing/word  processing
		*     neutral character management
		*     Arabic floating point symbol
		*     Arabic Dual Keyboard management

This library is an independent library.  It can be used  for  any
application that wants to handle directly Arabic strings.

2. The X Window Arabic extension

This library contains arabized X11 routines for string  manipula-
tion.  These routines are the following:

	*       XDrawString()
	*       XDrawImageString()
	*       XDrawText() for string display purposes and
	*       Xlookupstring() for keyboard management





3. The OSF MOTIF Arabic extension

This library contains Arabic complement routines  to  the  famous
Open Software Foundation "MOTIF Library".  This complement allows
the handling of the following primitive MOTIF widgets:

	*       Text
	*       Label


All other widget types benefit from this  arabization  (like  list,
file select box, push button, Menu, etc.).




                                 The XLANGBOX Environment(Cont'd)
_________________________________________________________________



4. The Arabic fonts for the server

XLANGBOX-ARA supply a set of Arabic fonts for the X  server  run-
ning  on the target machine.  These fonts are in "snf" format and
also in  "bdf"  format  for  heterogeneous  network  connections.
Several  sizes  are available and can be selected either from the
application itself or from a resource file.


XLANGBOX-ARA contains fixed spacing fonts and proportional  spac-
ing fonts that gives better looking results for Arabic.

5. The Demo set

This set is given for X11/MOTIF developers.  It allows to  under-
stand how arabization can be included in an existing application.
This demo set includes samples for:

	*       Sample  contextation program
	*       Pure   X   Window   (X11)   interfaced  program
	*       OSF/MOTIF interfaced  application
	*       OSF/MOTIF  and UIL build applications

Several Arabic software developer's recommendations are also  in-
cluded.

6. The Printing Support

This sub package consists in a set  of  printer  fonts  that  are
downloaded  directly  on  the  supported  printer, using specific
XLANGBOX command.

It also includes a new specific line printer spooler that must be
used  instead of the standard lp or lpr ones, for printing Arabic
files.

Postscript printing is also supported.


                                     The XLANGBOX Standard Aspect
_________________________________________________________________



The XLANGBOX Standard Aspect
============================


XLANGBOX is adapted to the standards as set forth by AT&T's SVID,
X Window System and ISO.

The standards adopted under XLANGBOX for Arabic  are  related  to
the following:

	*       Character sets.
	*       Standard  display  conventions.
	*       Arabic level support standards.

1 - The Character Sets

The Arabic characters are 8-bits wide and conform to  the follow-
ing standard :

	*       ISO 8859-5 (ASMO 708).
	*       ASMO 449+

2 - Display Conventions

Characters will be displayed according to their language specific
conventions.  Latin  characters  will  always  appear separately,
while Arabic characters will be contexted and displayed in  their
composite form.

The display technique adopted depends on  the  base  and  current
languages chosen by the user.

When the environment is Latin, the initial cursor position is  at
the  left  of  the  line and characters are added to the right as
they are entered. Arabic characters are inserted, and  pushed  to
the right as they are entered.

When the environment is Arabic, the  reverse  phenomenon  occurs:
the  initial cursor position is at the right most position of the
line, Arabic characters are added and Latin ones are inserted.
Vocalization  is  fully  supported  on   terminals   capable   of
displaying 256 downloadable characters.

3 - Neutral Characters

These characters are not context sensitive and do not, therefore,
affect  the shape of Arabic characters. Yet they have, in certain
instances, opposite meaning in Arabic, due to  the  direction  in
which this language is written. Typical examples are:
                    ( )  {  }  < > ...etc.
A special command handles the meaning the user wants to assign to
these special characters.

                            The XLANGBOX Standard Aspect (cont'd)
_________________________________________________________________


4 - Numerals

The user is provided with  a  command  allowing   the display  of
numerals in Latin or Arabic. All known  complications  associated
with this subject  have  been  solved  and  incorporated  in  the
package.



5 - Automatic Shape Determination

The standard rule is to display characters in the way calligraphy
requires  it.  It was, however, found that this feature should be
optional, since system users are frequently in  debug  work  ses-
sions and prefer to have their characters displayed in their ori-
ginal, base form. A pair of routines has been included to inhibit
or  restore  Automatic Shape Determination.  This process is also
called "context analysis".

6 - Dual Keyboard

XLANGBOX manage a logical dual keyboard.  A keystroke  allows  to
switch  from  one  to the other (generally the <ctrl T>).  Arabic
layout  is  indicated  by  transparent  stickers  that  the  user
places on his Latin Keyboard.

7 - Availability

XLANGBOX-ARA  1.1  is  available  on  the   following   operating
systems/environments:

	*  SCO UNIX System V release 3.2 (AT and MCA versions) /
	   Open Desktop (ODT)

	*  INTERGRAPH CLIX / X Window and I/FORMS
	*  SUN/OS SPARC series / Open Window
	*  CDC's  EP/IX  / RISC Window

XLANGBOX-ARA 1.1 is available on the following target machines :


	*  PC/AT Architecture on the Intel 80386 and 80486  platform
	*  INTERGRAPH  INTERPRO series.
	*  SUN's SPARC series.
	*  Control Data's Mips series.




Technical Contact:
Fathi Amara / Franck Portaneri
Concept Technology International
Nice Leader - Le Centaure -
66-68, Route de Grenoble
06200 Nice
France.

Tel. : (33).93.18.92.02
Fax. : (33).93.18.92.04
Technical Details
Message-ID: <1993Jun2.161338.15454@cis.vutbr.cz>
Path: arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!howland.reston.ans.net!paladin.american.edu!news.univie.ac.at!blekul11!alijku11!aci.cvut.cs!cis.vutbr.cz!insoft-l@cis.vutbr.cz

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 110cdc,e09056d717bcb0ac,start
X-Google-Attributes: gid110cdc,public
X-Google-ArrivalTime: 1993-06-02 21:10:47 PST
Newsgroups: bit.software.international
Path: arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!howland.reston.ans.net!paladin.american.edu!news.univie.ac.at!blekul11!alijku11!aci.cvut.cs!cis.vutbr.cz!insoft-l@cis.vutbr.cz
From: Fethi AMARA <Fethi.Amara@sophia.inria.fr>
Subject: The Bilingual Latin/Arabic Supplement to X Window Applications
Date: Wed, 2 Jun 1993 16:13:38 GMT
Message-ID: <1993Jun2.161338.15454@cis.vutbr.cz>
Approved: insoft-l-moderator@cis.vutbr.cz
Sender: insoft-l@cis.vutbr.cz
Reply-To: <insoft-l@cis.vutbr.cz>
Originator: insoft-l@cis.vutbr.cz
Organization: Technical University of Brno, Czech Republic
Lines: 506