[Mplayer-cvslog] CVS: main/libvo font_load.c,1.10,1.11 font_load.h,1.4,1.5 sub.c,1.6,1.7
GEREOFFY
arpi_esp at users.sourceforge.net
Sun May 6 04:26:19 CEST 2001
Update of /cvsroot/mplayer/main/libvo
In directory usw-pr-cvs1:/tmp/cvs-serv8761
Modified Files:
font_load.c font_load.h sub.c
Log Message:
better .smi support and display two-byte characters- patch by Sunjin Yang
Index: font_load.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/font_load.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** font_load.c 2001/04/11 01:38:56 1.10
--- font_load.c 2001/05/06 02:26:17 1.11
***************
*** 175,179 ****
int start=atoi(p[1]);
int end=atoi(p[2]);
! if(strlen(p[0])!=1) chr=strtol(p[0],NULL,0);
if(end<start) {
printf("error in font desc: end<start for char '%c'\n",chr);
--- 175,180 ----
int start=atoi(p[1]);
int end=atoi(p[2]);
! if(chr>=0x80) chr=(chr<<8)+p[0][1];
! else if(strlen(p[0])!=1) chr=strtol(p[0],NULL,0);
if(end<start) {
printf("error in font desc: end<start for char '%c'\n",chr);
Index: font_load.h
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/font_load.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** font_load.h 2001/04/11 00:47:05 1.4
--- font_load.h 2001/05/06 02:26:17 1.5
***************
*** 15,21 ****
raw_file* pic_a[16];
raw_file* pic_b[16];
! short font[512];
! short start[512];
! short width[512];
} font_desc_t;
--- 15,21 ----
raw_file* pic_a[16];
raw_file* pic_b[16];
! short font[65536];
! short start[65536];
! short width[65536];
} font_desc_t;
Index: sub.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/sub.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** sub.c 2001/04/24 11:42:04 1.6
--- sub.c 2001/05/06 02:26:17 1.7
***************
*** 105,115 ****
for(j=0;j<len;j++){
! int w=vo_font->width[text[j]];
! if(w>100) printf("gazvan: %d (%d=%c)\n",w,text[j],text[j]);
xsize+=w+vo_font->charspace;
}
//printf("text width = %d\n",xsize);
! if(xsize>dxs) printf("Warning! SUB too wide!!! (%d>%d)\n",xsize,dxs);
x=dxs/2-xsize/2;
--- 105,116 ----
for(j=0;j<len;j++){
! int c=text[j];
! int w = vo_font->width[(c<0x80)?c:(c<<8)+text[++j]];
! if(w>100) printf("gazvan: %d (%d=%c)\n",w,c,c);
xsize+=w+vo_font->charspace;
}
//printf("text width = %d\n",xsize);
! //if(xsize>dxs) printf("Warning! SUB too wide!!! (%d>%d)\n",xsize,dxs);
x=dxs/2-xsize/2;
***************
*** 117,121 ****
for(j=0;j<len;j++){
int c=text[j];
! int font=vo_font->font[c];
if(x>=0 && x+vo_font->width[c]<dxs)
if(font>=0)
--- 118,124 ----
for(j=0;j<len;j++){
int c=text[j];
! int font;
! if (c>=0x80) c=(c<<8)+text[++j];
! font = vo_font->font[c];
if(x>=0 && x+vo_font->width[c]<dxs)
if(font>=0)
_______________________________________________
Mplayer-cvslog mailing list
Mplayer-cvslog at lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/mplayer-cvslog
More information about the MPlayer-cvslog
mailing list