BiDi code concepts / help needed

All development related issues welcome

Moderator: Moderator Team

Post Reply
peterooch
Posts: 25
Joined: Fri Oct 21, 2011 4:01 pm
Location: Be'er Sheva, Israel
Contact:

BiDi code concepts / help needed

Post by peterooch »

So i have tried to tackle the BiDi text issue that is existing still and i would like to see if somebody can help me how to make it work...
I figured out the "principle" of what to do but with my quite limited skill i can't make it work out...
in the link i have 3 "concepts" of which the 3rd one is "complete" (it should work but it doesn't because pointers are awful to figure out for me)
https://github.com/peterooch/myutils/tr ... di_tryouts
also in a seperate attempt i tried to use the BiDi_Reorder from wine in
https://github.com/peterooch/reactos/co ... 054af74714
bidi.c is copied from wine's gdi source and i tried to intergrate it in GreTextOutW (didn't compile)
and lastly i tried to use the fribidi code
https://github.com/peterooch/reactos/bl ... cts/bidi.c
but i can't figure how to even make it build...

if the code looks awful its because im awful with c

Also the mirroring needs to be fixed but its for a diffrent discussion...
ThFabba
Developer
Posts: 293
Joined: Sun Jul 11, 2010 11:39 am

Re: BiDi code concepts / help needed

Post by ThFabba »

For method 2: Win32k is kernel code which means Win32 functions are not available. For example you need to use ExAllocatePoolWithTag/ExFreePoolWithTag instead of HeapAlloc/HeapFree (and checks for allocation failure are strictly mandatory). And usp10's ScriptXxx functions will not be available at all, so you'd have to call freetype directly somehow.
I'm not a subject matter expert on fonts or anything related, but I may be able to explain some compiler errors if you include them.
learn_more
Developer
Posts: 246
Joined: Fri Dec 19, 2014 10:00 pm

Re: BiDi code concepts / help needed

Post by learn_more »

I would very much like to urge you not to write BiDi ordering code yourself, as the rules for this are very complex.
As a first attempt, I would check to see if freetype allows to do this,
and if it cannot do what you want, check if there is another library that will do it. (Like fribidi)

These 2 sites seem to do a decent job of presenting the info in a small page (haven't read them fully):
https://www.w3.org/International/articl ... uba-basics
https://www.iamcal.com/understanding-bi ... onal-text/

And here is the full 'spec':
http://www.unicode.org/reports/tr9/
peterooch
Posts: 25
Joined: Fri Oct 21, 2011 4:01 pm
Location: Be'er Sheva, Israel
Contact:

Re: BiDi code concepts / help needed

Post by peterooch »

learn_more wrote:I would very much like to urge you not to write BiDi ordering code yourself, as the rules for this are very complex.
As a first attempt, I would check to see if freetype allows to do this,
and if it cannot do what you want, check if there is another library that will do it. (Like fribidi)
...
The third link is a fribidi concept implementation, but i didn't managed to make it work,
i'll think what i'm doing wrong and maybe figure out how to make it work.

and about the other "concepts" and the fribidi one (not the wine one) are being placed in gdi32, not w32k(afaik)

at least i have a some sort of an idea of what to do.
Post Reply

Who is online

Users browsing this forum: No registered users and 13 guests