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

Re: miniBidi



Message: 6
Date: Fri, 4 Mar 2005 15:12:37 +0000
From: Abdulhaq Lynch <al-arabeyes at alinsyria dot fsnet dot co dot uk>
Subject: Re: minibidi
salaam Ahmad
thanks for the work on minibidi and the prompt reply. With your new code I now

No, Thank you for using it :) hope its helping you :)

get this (see below,the words are kitaab with the kasra and kutub without tashkeel). It seems the kasra (0x650) is becoming 0x4024 but other than that it all works fine. Any ideas?

: char 0 is 643
: char 1 is 650
: char 2 is 62a
: char 3 is 627
: char 4 is 628
: mark 0
: do shape
: do bidi
: back to QString
: add char fe8f
: add char fe8e
: add char fe98
: add char 4024
: add char fedb

: char 0 is 643
: char 1 is 62a
: char 2 is 628
: mark 0
: do shape
: do bidi
: back to QString
: add char fe90
: add char fe98
: add char fedb



I see up there that you might be calling doShape yourself ? why not let doBidi() do it ? if thats the case then you have to copy the original string to the destination string first. doBidi() takes care of that if you pass applyShape == 1. 4024 probably was there before the doShape() call.

I know that copying the string can be dodged by copying
each char in the doShape() iterations, but I had a motive for
that which I cant seem to remember, so if I cant remember it by
next week I'll move the string copying thing inside doShape()
and you wont have to do it yourself.

BTW, whats that QString you're using ? take a look at this...

[code]
/*
 * Datatype Extension Macros
 */
#define BLOCKTYPE unsigned short*
#define CHARTYPE unsigned short
#define GETCHAR(from,i) from[i]
[/code]

at the begining of minibidi.c you'll find these macros, if you can fit
QString's usage into these macros, you can call doBidi directly on a
QString, i.e doBidi will use the QString and you wont have to copy to
another array. is there an online doc for it ? something like an MSDN
page or doxygen ?

Im on the developer list in digest mode, so my replies might
be 1 day late :(


ak.