[Mplayer-cvslog] CVS: main/libvo font_load.h,1.7,1.8 font_load.c,1.22,1.23

Arpi of Ize arpi at mplayerhq.hu
Thu May 2 03:56:16 CEST 2002


Update of /cvsroot/mplayer/main/libvo
In directory mail:/var/tmp.root/cvs-serv487

Modified Files:
	font_load.h font_load.c 
Log Message:
.raw width>=65536 support by Georgi Georgiev <chutz at chubaka.homeip.net>

Index: font_load.h
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/font_load.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- font_load.h	24 Mar 2002 00:32:13 -0000	1.7
+++ font_load.h	2 May 2002 01:56:00 -0000	1.8
@@ -16,7 +16,7 @@
     raw_file* pic_a[16];
     raw_file* pic_b[16];
     short font[65536];
-    short start[65536];
+    int start[65536];   // short is not enough for unicode fonts
     short width[65536];
 } font_desc_t;
 

Index: font_load.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/font_load.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- font_load.c	25 Oct 2001 23:34:13 -0000	1.22
+++ font_load.c	2 May 2002 01:56:00 -0000	1.23
@@ -22,6 +22,8 @@
     raw->w=head[8]*256+head[9];
     raw->h=head[10]*256+head[11];
     raw->c=head[12]*256+head[13];
+    if(raw->w == 0) // 2 bytes were not enough for the width... read 4 bytes from the end of the header
+    	raw->w = ((head[28]*0x100 + head[29])*0x100 + head[30])*0x100 + head[31];
     if(raw->c>256) return NULL;                 // too many colors!?
     if(verbose) printf("RAW: %s  %d x %d, %d colors\n",name,raw->w,raw->h,raw->c);
     if(raw->c){




More information about the MPlayer-cvslog mailing list