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

RE: putty can shape now..





i hope no one minds if i reply to myself...:))

How to Convert to the magik Index string..?? --> GetCharacterPlacement()...
GetCharacterPlacement takes a Single-Byte string, and returns a Double-Byte String of Indices
now to give GetCharacterPlacement a single-byte string containing arabic chars, you have
to convert from wide charecter (usually U+0637) to CP-1256 which is windows code page

here.. use this function before GetCharacterPlacement and change it...


//===================
WideCharToMultiByte(term->ucsdata->font_codepage , 0, wbuf, len, buff3, 1020, 0, 0);
GetCharacterPlacement(hdc, buff3/*temp1*/, /*8*/len, 0, &gcpr, FLI_MASK | GCP_CLASSIN);
//===================


so now its not a static array of test bytes u write in code.... it actually works fine now...
i didnt know at first that WCTMB() could convert from Unicode to different CodePages...


btw term->ucsdata->font_codepage <== that depends on the font's script that u choose...
or remove that and put 1256 or 0x4e8....



well... try it and tell me how it went...

ak...


_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus