summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
Diffstat (limited to 'libvo')
-rw-r--r--libvo/font_load.c2
-rw-r--r--libvo/font_load.h2
2 files changed, 3 insertions, 1 deletions
diff --git a/libvo/font_load.c b/libvo/font_load.c
index 672123bb86..4a35a5eb65 100644
--- a/libvo/font_load.c
+++ b/libvo/font_load.c
@@ -22,6 +22,8 @@ raw_file* load_raw(char *name,int verbose){
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){
diff --git a/libvo/font_load.h b/libvo/font_load.h
index d43325521b..6e144d5926 100644
--- a/libvo/font_load.h
+++ b/libvo/font_load.h
@@ -16,7 +16,7 @@ typedef struct {
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;