[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Maps for Arabic and other semitic based scripts



Salaam Behdad,

Behdad Esfahbod a *crit :

> Hi,
>
> Please use the latest fribidi release fribidi-0.10.0, it has lots of
> improvements.

I saw that, downloaded the source code, but finally decided not to use it
until this version becomes more widespread in a few months in order not to
oblige people to go into unnecessary downloads that would scare them off
Akka. In any case, I only need the charset conversion functions (yes, I've
seen that the latest version has lots more:)) and the logical to visual
reordering function.

> (snip) you will find
> everything you need for persian support there.

Actually Akka already supports Persian internally. What is needed is to edit
some datafiles.
Here is exactly what is needed to have it up and running (the same actually
goes for any other semitic based script), note that I assume the reader has
some knowledge of the standard console tools:
1) Adapt the console tools keymap you use for your Persian keyboard by
adjusting 3 keys and bind them to Akka modifier codes (direction switch =
0x86, block cursor insertion = 0x87, Latin/Persian keyboard switch = 0x88).
For example, in my keyboard I chose F10, F11 and F12.
2) IF you do not have a Persian console font ready, create one with fonter,
or your favorite console font editor. The font will have to include all
possible shapes in case you want to use it for glyph shaping. As an
interesting experience, I have created a "square Arabic" font which doesn't
require shaping and is very readable. You can inspire yourself from that one
if you want to have fun or don't want to bother with the glyph map file and
font edition necessary for shaping.
3) If you want or need shaping, you have to put the characters to be shaped
(you don't need more than these) in the following human readable format:

# comments start with a number sign
charpos lonepos startpos midpos endpos

where

charpos is the position of the character in the used encoding,

lonepos, startpos, midpos and endpos are respectively the positions of the
character in lone, start of word, middle word, end of word form in the font
file
A value of 0 in one of these indicates that that position is not supported
(e.g, Ra doesn't have a first or mid form, the lone form is used and the
following character is treated as first if possible).

If there is any volunteer, I might help and guide step by step though the
process if needed.

> And about charsets, you can use iconv for encodings that fribidi does
> not support, the new fribidi has a configure time option
> --without-charsets, that causes command line tool to use iconv.

I've been thinking about iconv, but since I've never used it, I was a bit
lazy to learn about it, and most of all, I didn't like the idea of adding an
additional dependency unless it has a great added value.
But I want to understand you here, are you telling me that a program compiled
against the latest version of fribidi would automatically invoque iconv as a
child process in order to do some conversion work??? I don't think I
understood you...

next in the following mail, "fribidi question",