<font size=2 face="Arial">Hi!</font>
<br>
<br><font size=2 face="Arial">I am about to implement support for Arabic
script in an embedded system, where small footprint in flash and particularly
RAM is important.</font>
<br><font size=2 face="Arial">The system does also handle languages using
the latin alphabet. The handling and rendering of Arabic script will be
pretty basic, and the plan is</font>
<br><font size=2 face="Arial">to support only the 28 basic characters including
positional forms and the ligature lam + alef, and also the Arabic-Indic
numerals. I hope that's</font>
<br><font size=2 face="Arial">"decent enough", or are there some
other arabic characters/glyphs that I "must" support? (I don't
speak/read/write Arabic, so I am not 100% sure here)</font>
<br><font size=2 face="Arial"> </font>
<br><font size=2 face="Arial">Support for Arabic script should preferably
not add much more than 40-50 kB to my current binary, although 80 kB might
be ok. However, 100 kB would probably</font>
<br><font size=2 face="Arial">be too much. Since limited memory is a big
issue, I currently see two main options (since I reckon using the ICU lib
would not be acceptable from memory point of view):</font>
<br>
<br><font size=2 face="Arial">a) The preferred way: Use the FriBidi in
a reduced version where I comment/configure out or remove parts I don't
need. As I understand, the latest version fully complies with the Unicode
BiDi algorithm,</font>
<br><font size=2 face="Arial">including the bidi control codes, and is
practically bug free. In addition it also supports Arabic shaping. That
all makes FriBidi attractive, but currently the footprint is unfortunately
too big for me.</font>
<br>
<br><font size=2 face="Arial">b) Second way out: Use for instance the C
reference implementation of the Unicode Bidi algorithm (by adding the necessary
wrapping) + write my own code to handle the Arabic shaping.</font>
<br>
<br><font size=2 face="Arial">For reference: when I compiled using GCC
on Ubuntu, the C ref implementation binary was about 20 kB (dynamically
linked) and the FriBidi lib was about 165 kB (dynamically linked).</font>
<br>
<br><font size=2 face="Arial">1) Are there some easy steps to reduce the
size of the FriBidi binary, and does anyone have any experience how much
the FriBidi binary in that case could be reduced?</font>
<br><font size=2 face="Arial"> From a quick look in the code
there seemed to be some fairly large tables which I assume could be reduced,
plus some Hebrew related conversion routines to/from Unicode that are not
needed in my case.</font>
<br><font size=2 face="Arial"> Are there any nifty defines
or other config parameters I have missed, that would reduce size?</font>
<br><font size=2 face="Arial"> </font>
<br><font size=2 face="Arial">2) If I don't succeed in reducing FriBidi
enough, does anyone have a rough clue or experience of how much time it
might take to implement a basic version of Arabic shaping based on my needs,</font>
<br><font size=2 face="Arial"> or have any clue/experience
of how much that could add to the footprint? </font>
<br><font size=2 face="Arial"> Implementing the Arabic shaping
doesn't seem extremely hard given the pretty basic shaping I need, but
I am sure there are problems I don't foresee, so I guess I shouldn't say
anything until I have tried. :-)</font>
<br>
<br>
<br><font size=2 face="Arial">Best regards,</font>
<br><font size=2 face="Arial">Mikael</font>