Hi,

> When I'm porting Tinyx to StrongARM,Ifound X doing wrong things at
> chinese word,
> but Im not sure.
>
> I find tinyx at StrongARM olny show halt of chese word,this is say:when
> I show 4 chinese word in message box, it gets only 2,show 10 and get 5;
> if only 1 word, it show nothing.
> I read the source,and find the error occur at lib/X11/omText.c:
> in the fuction DrawStringWithFontSet:
> char_len = ptr_len / sizeof(XChar2b)
> when a chinese word, ptr_len is 2,and At the StrongARM, sizeof(XChar2b)
> is 4, then  char_len is get 0;
> such error also occur at font width calculation.

  The string you found is right. But the ptr_len here should represent
a complete count of bytes taking in account all padding bytes in the
XChar2b structure.
  I think the bug is in the lib/X11/omXChar.c:_XomGetFontDataFromFontSet
subroutine.
 The string
    if(is2b){
        csize = 2;
must be
        csize = sizeof(XChar2b);

-- 
 Ivan U. Pascal         |   e-mail: [EMAIL PROTECTED]
   Administrator of     |   Tomsk State University
     University Network |       Tomsk, Russia
_______________________________________________
I18n mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/i18n

Reply via email to