[MPlayer-users] [MPlayer-dev-eng] [Bug] Can't display two-byte CJK characters in OSDmenu

Bob Cheng hdrhg at hotmail.com
Fri Mar 28 07:19:31 CET 2003


Hi:

  If my file is named XY.avi (X Y are two-byte Chinese characters), it will 
be shown as ____.avi (4 underlines) in 'OSD open...' menu.

  It appeared to be the wrong way (byte-wise) to render text in 
libmenu/menu.c:

#define render_txt(t)  { char* p = t;  while(*p) 
render_one_glyph(vo_font,*p++); }

and

  while (*txt) {
    unsigned char c=*txt++;
    if ((font=vo_font->font[c])>=0 && (x + vo_font->width[c] <= mpi->w) && 
(y + vo_font->pic_a[font]->h <= mpi->h))
      draw_alpha(vo_font->width[c], vo_font->pic_a[font]->h,
		 vo_font->pic_b[font]->bmp+vo_font->start[c],
		 vo_font->pic_a[font]->bmp+vo_font->start[c],
		 vo_font->pic_a[font]->w,
		 mpi->planes[0] + y * mpi->stride[0] + x * (mpi->bpp>>3),
		 mpi->stride[0]);
    x+=vo_font->width[c]+vo_font->charspace;
  }

But I have no idea how to fix it right now. Any suggestions are welcome!!!

Bob Cheng



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



More information about the MPlayer-users mailing list