Mercurial > mplayer.hg
annotate libvo/font_load.c @ 16450:40222952440f
DR and slice support
author | henry |
---|---|
date | Sun, 11 Sep 2005 10:52:24 +0000 |
parents | de6ed5d2805d |
children | b8be9bedc108 |
rev | line source |
---|---|
7122
0dc9cb756b68
freetype 2.0/2.1+ support - disabled by default until bugs fixed
arpi
parents:
5928
diff
changeset
|
1 #include "config.h" |
0dc9cb756b68
freetype 2.0/2.1+ support - disabled by default until bugs fixed
arpi
parents:
5928
diff
changeset
|
2 |
213 | 3 #include <stdio.h> |
4 #include <stdlib.h> | |
5 #include <string.h> | |
1446 | 6 #include <sys/types.h> |
7 #include <sys/stat.h> | |
8 #include <unistd.h> | |
213 | 9 |
10 #include "font_load.h" | |
13897
41a4fc8421e9
Converted printf calls to mp_msg, reduced verbosity.
diego
parents:
13641
diff
changeset
|
11 #include "mp_msg.h" |
213 | 12 |
2476 | 13 extern char *get_path ( char * ); |
216
338b5664ea13
Search font files in ~/.mplayer/font/ instead of current dir
lgb
parents:
215
diff
changeset
|
14 |
339 | 15 raw_file* load_raw(char *name,int verbose){ |
213 | 16 int bpp; |
17 raw_file* raw=malloc(sizeof(raw_file)); | |
18 unsigned char head[32]; | |
19 FILE *f=fopen(name,"rb"); | |
20 if(!f) return NULL; // can't open | |
21 if(fread(head,32,1,f)<1) return NULL; // too small | |
22 if(memcmp(head,"mhwanh",6)) return NULL; // not raw file | |
23 raw->w=head[8]*256+head[9]; | |
24 raw->h=head[10]*256+head[11]; | |
25 raw->c=head[12]*256+head[13]; | |
5928
48e91dc9534b
.raw width>=65536 support by Georgi Georgiev <chutz@chubaka.homeip.net>
arpi
parents:
2476
diff
changeset
|
26 if(raw->w == 0) // 2 bytes were not enough for the width... read 4 bytes from the end of the header |
48e91dc9534b
.raw width>=65536 support by Georgi Georgiev <chutz@chubaka.homeip.net>
arpi
parents:
2476
diff
changeset
|
27 raw->w = ((head[28]*0x100 + head[29])*0x100 + head[30])*0x100 + head[31]; |
213 | 28 if(raw->c>256) return NULL; // too many colors!? |
13897
41a4fc8421e9
Converted printf calls to mp_msg, reduced verbosity.
diego
parents:
13641
diff
changeset
|
29 mp_msg(MSGT_OSD, MSGL_DBG2, "RAW: %s %d x %d, %d colors\n",name,raw->w,raw->h,raw->c); |
213 | 30 if(raw->c){ |
31 raw->pal=malloc(raw->c*3); | |
32 fread(raw->pal,3,raw->c,f); | |
33 bpp=1; | |
34 } else { | |
35 raw->pal=NULL; | |
36 bpp=3; | |
37 } | |
38 raw->bmp=malloc(raw->h*raw->w*bpp); | |
39 fread(raw->bmp,raw->h*raw->w*bpp,1,f); | |
40 fclose(f); | |
41 return raw; | |
42 } | |
43 | |
728 | 44 extern int sub_unicode; |
45 | |
339 | 46 font_desc_t* read_font_desc(char* fname,float factor,int verbose){ |
213 | 47 unsigned char sor[1024]; |
48 unsigned char sor2[1024]; | |
49 font_desc_t *desc; | |
50 FILE *f; | |
2222
ddf897c38fb1
read font files from the same dir as font.desc or as specified in font.desc
atlka
parents:
1446
diff
changeset
|
51 char *dn; |
1446 | 52 struct stat fstate; |
213 | 53 char section[64]; |
54 int i,j; | |
55 int chardb=0; | |
56 int fontdb=-1; | |
214 | 57 int version=0; |
8635
81dbd28ef7c0
these patches let ,,oldstyle'' and freetype subtitle renderers live
arpi
parents:
7122
diff
changeset
|
58 int first=1; |
213 | 59 |
13641 | 60 desc=malloc(sizeof(font_desc_t));if(!desc) goto fail_out; |
213 | 61 memset(desc,0,sizeof(font_desc_t)); |
62 | |
14065 | 63 f=fopen(fname,"rt");if(!f){ mp_msg(MSGT_OSD, MSGL_V, "font: can't open file: %s\n",fname); goto fail_out;} |
213 | 64 |
2222
ddf897c38fb1
read font files from the same dir as font.desc or as specified in font.desc
atlka
parents:
1446
diff
changeset
|
65 i = strlen (fname) - 9; |
2223 | 66 if ((dn = malloc(i+1))){ |
2222
ddf897c38fb1
read font files from the same dir as font.desc or as specified in font.desc
atlka
parents:
1446
diff
changeset
|
67 strncpy (dn, fname, i); |
ddf897c38fb1
read font files from the same dir as font.desc or as specified in font.desc
atlka
parents:
1446
diff
changeset
|
68 dn[i]='\0'; |
ddf897c38fb1
read font files from the same dir as font.desc or as specified in font.desc
atlka
parents:
1446
diff
changeset
|
69 } |
ddf897c38fb1
read font files from the same dir as font.desc or as specified in font.desc
atlka
parents:
1446
diff
changeset
|
70 |
ddf897c38fb1
read font files from the same dir as font.desc or as specified in font.desc
atlka
parents:
1446
diff
changeset
|
71 desc->fpath = dn; // search in the same dir as fonts.desc |
1446 | 72 |
2222
ddf897c38fb1
read font files from the same dir as font.desc or as specified in font.desc
atlka
parents:
1446
diff
changeset
|
73 // desc->fpath=get_path("font/"); |
ddf897c38fb1
read font files from the same dir as font.desc or as specified in font.desc
atlka
parents:
1446
diff
changeset
|
74 // if (stat(desc->fpath, &fstate)!=0) desc->fpath=DATADIR"/font"; |
ddf897c38fb1
read font files from the same dir as font.desc or as specified in font.desc
atlka
parents:
1446
diff
changeset
|
75 |
ddf897c38fb1
read font files from the same dir as font.desc or as specified in font.desc
atlka
parents:
1446
diff
changeset
|
76 |
ddf897c38fb1
read font files from the same dir as font.desc or as specified in font.desc
atlka
parents:
1446
diff
changeset
|
77 |
1446 | 78 |
213 | 79 // set up some defaults, and erase table |
80 desc->charspace=2; | |
81 desc->spacewidth=12; | |
82 desc->height=0; | |
12609
4be019266884
array initialization fix by SungKwanKang <ksquarekr at yahoo.com>
faust3
parents:
10272
diff
changeset
|
83 for(i=0;i<65536;i++) desc->start[i]=desc->width[i]=desc->font[i]=-1; |
213 | 84 |
85 section[0]=0; | |
86 | |
87 while(fgets(sor,1020,f)){ | |
88 unsigned char* p[8]; | |
89 int pdb=0; | |
90 unsigned char *s=sor; | |
91 unsigned char *d=sor2; | |
92 int ec=' '; | |
93 int id=0; | |
94 sor[1020]=0; | |
8635
81dbd28ef7c0
these patches let ,,oldstyle'' and freetype subtitle renderers live
arpi
parents:
7122
diff
changeset
|
95 |
81dbd28ef7c0
these patches let ,,oldstyle'' and freetype subtitle renderers live
arpi
parents:
7122
diff
changeset
|
96 /* skip files that look like: TTF (0x00, 0x01), PFM (0x00, 0x01), PFB |
81dbd28ef7c0
these patches let ,,oldstyle'' and freetype subtitle renderers live
arpi
parents:
7122
diff
changeset
|
97 * (0x80, 0x01), PCF (0x01, 0x66), fon ("MZ"), gzipped (0x1f, 0x8b) */ |
81dbd28ef7c0
these patches let ,,oldstyle'' and freetype subtitle renderers live
arpi
parents:
7122
diff
changeset
|
98 |
81dbd28ef7c0
these patches let ,,oldstyle'' and freetype subtitle renderers live
arpi
parents:
7122
diff
changeset
|
99 if (first) { |
81dbd28ef7c0
these patches let ,,oldstyle'' and freetype subtitle renderers live
arpi
parents:
7122
diff
changeset
|
100 if (!sor[0] || sor[1] == 1 || (sor[0] == 'M' && sor[1] == 'Z') || (sor[0] == 0x1f && sor[1] == 0x8b) || (sor[0] == 1 && sor[1] == 0x66)) { |
13897
41a4fc8421e9
Converted printf calls to mp_msg, reduced verbosity.
diego
parents:
13641
diff
changeset
|
101 mp_msg(MSGT_OSD, MSGL_ERR, "%s doesn't look like a font description, ignoring.\n", fname); |
13641 | 102 goto fail_out; |
8635
81dbd28ef7c0
these patches let ,,oldstyle'' and freetype subtitle renderers live
arpi
parents:
7122
diff
changeset
|
103 } |
81dbd28ef7c0
these patches let ,,oldstyle'' and freetype subtitle renderers live
arpi
parents:
7122
diff
changeset
|
104 first = 0; |
81dbd28ef7c0
these patches let ,,oldstyle'' and freetype subtitle renderers live
arpi
parents:
7122
diff
changeset
|
105 } |
81dbd28ef7c0
these patches let ,,oldstyle'' and freetype subtitle renderers live
arpi
parents:
7122
diff
changeset
|
106 |
213 | 107 p[0]=d;++pdb; |
108 while(1){ | |
109 int c=*s++; | |
110 if(c==0 || c==13 || c==10) break; | |
111 if(!id){ | |
112 if(c==39 || c==34){ id=c;continue;} // idezojel | |
113 if(c==';' || c=='#') break; | |
114 if(c==9) c=' '; | |
115 if(c==' '){ | |
116 if(ec==' ') continue; | |
117 *d=0; ++d; | |
118 p[pdb]=d;++pdb; | |
119 if(pdb>=8) break; | |
120 continue; | |
121 } | |
122 } else { | |
123 if(id==c){ id=0;continue;} // idezojel | |
124 | |
125 } | |
126 *d=c;d++; | |
127 ec=c; | |
128 } | |
129 if(d==sor2) continue; // skip empty lines | |
130 *d=0; | |
131 | |
132 // printf("params=%d sor=%s\n",pdb,sor); | |
133 // for(i=0;i<pdb;i++) printf(" param %d = '%s'\n",i,p[i]); | |
134 | |
135 if(pdb==1 && p[0][0]=='['){ | |
136 int len=strlen(p[0]); | |
137 if(len && len<63 && p[0][len-1]==']'){ | |
138 strcpy(section,p[0]); | |
13897
41a4fc8421e9
Converted printf calls to mp_msg, reduced verbosity.
diego
parents:
13641
diff
changeset
|
139 mp_msg(MSGT_OSD, MSGL_DBG2, "font: Reading section: %s\n",section); |
213 | 140 if(strcmp(section,"[files]")==0){ |
141 ++fontdb; | |
13897
41a4fc8421e9
Converted printf calls to mp_msg, reduced verbosity.
diego
parents:
13641
diff
changeset
|
142 if(fontdb>=16){ mp_msg(MSGT_OSD, MSGL_ERR, "font: Too many bitmaps defined.\n");goto fail_out;} |
213 | 143 } |
144 continue; | |
145 } | |
146 } | |
147 | |
1353 | 148 if(strcmp(section,"[fpath]")==0){ |
149 if(pdb==1){ | |
2222
ddf897c38fb1
read font files from the same dir as font.desc or as specified in font.desc
atlka
parents:
1446
diff
changeset
|
150 if (desc->fpath) |
ddf897c38fb1
read font files from the same dir as font.desc or as specified in font.desc
atlka
parents:
1446
diff
changeset
|
151 free (desc->fpath); // release previously allocated memory |
1353 | 152 desc->fpath=strdup(p[0]); |
153 continue; | |
154 } | |
155 } else | |
156 | |
213 | 157 if(strcmp(section,"[files]")==0){ |
10272
7b0bc557987b
renames: DATADIR->MPLAYER_DATADIR, CONFDIR->MPLAYER_CONFDIR, LIBDIR->MPLAYER_LIBDIR
arpi
parents:
8635
diff
changeset
|
158 char *default_dir=MPLAYER_DATADIR "/font"; |
213 | 159 if(pdb==2 && strcmp(p[0],"alpha")==0){ |
1353 | 160 char *cp; |
13641 | 161 if (!(cp=malloc(strlen(desc->fpath)+strlen(p[1])+2))) goto fail_out; |
1353 | 162 |
163 snprintf(cp,strlen(desc->fpath)+strlen(p[1])+2,"%s/%s", | |
164 desc->fpath,p[1]); | |
165 if(!((desc->pic_a[fontdb]=load_raw(cp,verbose)))){ | |
216
338b5664ea13
Search font files in ~/.mplayer/font/ instead of current dir
lgb
parents:
215
diff
changeset
|
166 free(cp); |
2238
be4160d7db48
if not found using fpath try to load font bitmaps from default dir
atlka
parents:
2223
diff
changeset
|
167 if (!(cp=malloc(strlen(default_dir)+strlen(p[1])+2))) |
13641 | 168 goto fail_out; |
2238
be4160d7db48
if not found using fpath try to load font bitmaps from default dir
atlka
parents:
2223
diff
changeset
|
169 snprintf(cp,strlen(default_dir)+strlen(p[1])+2,"%s/%s", |
be4160d7db48
if not found using fpath try to load font bitmaps from default dir
atlka
parents:
2223
diff
changeset
|
170 default_dir,p[1]); |
be4160d7db48
if not found using fpath try to load font bitmaps from default dir
atlka
parents:
2223
diff
changeset
|
171 if (!((desc->pic_a[fontdb]=load_raw(cp,verbose)))){ |
13897
41a4fc8421e9
Converted printf calls to mp_msg, reduced verbosity.
diego
parents:
13641
diff
changeset
|
172 mp_msg(MSGT_OSD, MSGL_ERR, "Can't load font bitmap: %s\n",p[1]); |
2238
be4160d7db48
if not found using fpath try to load font bitmaps from default dir
atlka
parents:
2223
diff
changeset
|
173 free(cp); |
13641 | 174 goto fail_out; |
2238
be4160d7db48
if not found using fpath try to load font bitmaps from default dir
atlka
parents:
2223
diff
changeset
|
175 } |
213 | 176 } |
216
338b5664ea13
Search font files in ~/.mplayer/font/ instead of current dir
lgb
parents:
215
diff
changeset
|
177 free(cp); |
213 | 178 continue; |
179 } | |
180 if(pdb==2 && strcmp(p[0],"bitmap")==0){ | |
1353 | 181 char *cp; |
13641 | 182 if (!(cp=malloc(strlen(desc->fpath)+strlen(p[1])+2))) goto fail_out; |
1353 | 183 |
184 snprintf(cp,strlen(desc->fpath)+strlen(p[1])+2,"%s/%s", | |
185 desc->fpath,p[1]); | |
186 if(!((desc->pic_b[fontdb]=load_raw(cp,verbose)))){ | |
216
338b5664ea13
Search font files in ~/.mplayer/font/ instead of current dir
lgb
parents:
215
diff
changeset
|
187 free(cp); |
2238
be4160d7db48
if not found using fpath try to load font bitmaps from default dir
atlka
parents:
2223
diff
changeset
|
188 if (!(cp=malloc(strlen(default_dir)+strlen(p[1])+2))) |
13641 | 189 goto fail_out; |
2238
be4160d7db48
if not found using fpath try to load font bitmaps from default dir
atlka
parents:
2223
diff
changeset
|
190 snprintf(cp,strlen(default_dir)+strlen(p[1])+2,"%s/%s", |
be4160d7db48
if not found using fpath try to load font bitmaps from default dir
atlka
parents:
2223
diff
changeset
|
191 default_dir,p[1]); |
be4160d7db48
if not found using fpath try to load font bitmaps from default dir
atlka
parents:
2223
diff
changeset
|
192 if (!((desc->pic_b[fontdb]=load_raw(cp,verbose)))){ |
13897
41a4fc8421e9
Converted printf calls to mp_msg, reduced verbosity.
diego
parents:
13641
diff
changeset
|
193 mp_msg(MSGT_OSD, MSGL_ERR, "Can't load font bitmap: %s\n",p[1]); |
2238
be4160d7db48
if not found using fpath try to load font bitmaps from default dir
atlka
parents:
2223
diff
changeset
|
194 free(cp); |
13641 | 195 goto fail_out; |
2238
be4160d7db48
if not found using fpath try to load font bitmaps from default dir
atlka
parents:
2223
diff
changeset
|
196 } |
213 | 197 } |
216
338b5664ea13
Search font files in ~/.mplayer/font/ instead of current dir
lgb
parents:
215
diff
changeset
|
198 free(cp); |
213 | 199 continue; |
200 } | |
201 } else | |
202 | |
203 if(strcmp(section,"[info]")==0){ | |
214 | 204 if(pdb==2 && strcmp(p[0],"name")==0){ |
205 desc->name=strdup(p[1]); | |
206 continue; | |
207 } | |
208 if(pdb==2 && strcmp(p[0],"descversion")==0){ | |
209 version=atoi(p[1]); | |
210 continue; | |
211 } | |
213 | 212 if(pdb==2 && strcmp(p[0],"spacewidth")==0){ |
213 desc->spacewidth=atoi(p[1]); | |
214 continue; | |
215 } | |
216 if(pdb==2 && strcmp(p[0],"charspace")==0){ | |
217 desc->charspace=atoi(p[1]); | |
218 continue; | |
219 } | |
220 if(pdb==2 && strcmp(p[0],"height")==0){ | |
221 desc->height=atoi(p[1]); | |
222 continue; | |
223 } | |
224 } else | |
214 | 225 |
213 | 226 if(strcmp(section,"[characters]")==0){ |
219 | 227 if(pdb==3){ |
213 | 228 int chr=p[0][0]; |
229 int start=atoi(p[1]); | |
230 int end=atoi(p[2]); | |
727 | 231 if(sub_unicode && (chr>=0x80)) chr=(chr<<8)+p[0][1]; |
706
8a7666a78f83
better .smi support and display two-byte characters- patch by Sunjin Yang
arpi_esp
parents:
340
diff
changeset
|
232 else if(strlen(p[0])!=1) chr=strtol(p[0],NULL,0); |
213 | 233 if(end<start) { |
13897
41a4fc8421e9
Converted printf calls to mp_msg, reduced verbosity.
diego
parents:
13641
diff
changeset
|
234 mp_msg(MSGT_OSD, MSGL_WARN, "error in font desc: end<start for char '%c'\n",chr); |
213 | 235 } else { |
236 desc->start[chr]=start; | |
237 desc->width[chr]=end-start+1; | |
238 desc->font[chr]=fontdb; | |
239 // printf("char %d '%c' start=%d width=%d\n",chr,chr,desc->start[chr],desc->width[chr]); | |
240 ++chardb; | |
241 } | |
242 continue; | |
243 } | |
244 } | |
13897
41a4fc8421e9
Converted printf calls to mp_msg, reduced verbosity.
diego
parents:
13641
diff
changeset
|
245 mp_msg(MSGT_OSD, MSGL_ERR, "Syntax error in font desc: %s",sor); |
13641 | 246 goto fail_out; |
213 | 247 |
248 } | |
249 fclose(f); | |
13641 | 250 f = NULL; |
213 | 251 |
12793
a9429d90157a
avoid using corrupted font descriptions patch by Daniel von Dincklage <danielvd+mpl@cs.colorado.edu>
faust3
parents:
12609
diff
changeset
|
252 if (first == 1) { |
13897
41a4fc8421e9
Converted printf calls to mp_msg, reduced verbosity.
diego
parents:
13641
diff
changeset
|
253 mp_msg(MSGT_OSD, MSGL_ERR, "%s is empty or a directory, ignoring.\n", fname); |
13641 | 254 goto fail_out; |
12793
a9429d90157a
avoid using corrupted font descriptions patch by Daniel von Dincklage <danielvd+mpl@cs.colorado.edu>
faust3
parents:
12609
diff
changeset
|
255 } |
a9429d90157a
avoid using corrupted font descriptions patch by Daniel von Dincklage <danielvd+mpl@cs.colorado.edu>
faust3
parents:
12609
diff
changeset
|
256 |
213 | 257 //printf("font: pos of U = %d\n",desc->start[218]); |
258 | |
259 for(i=0;i<=fontdb;i++){ | |
260 if(!desc->pic_a[i] || !desc->pic_b[i]){ | |
13897
41a4fc8421e9
Converted printf calls to mp_msg, reduced verbosity.
diego
parents:
13641
diff
changeset
|
261 mp_msg(MSGT_OSD, MSGL_ERR, "font: Missing bitmap(s) for sub-font #%d\n",i); |
13641 | 262 goto fail_out; |
213 | 263 } |
249 | 264 //if(factor!=1.0f) |
265 { | |
215 | 266 // re-sample alpha |
267 int f=factor*256.0f; | |
268 int size=desc->pic_a[i]->w*desc->pic_a[i]->h; | |
269 int j; | |
13897
41a4fc8421e9
Converted printf calls to mp_msg, reduced verbosity.
diego
parents:
13641
diff
changeset
|
270 mp_msg(MSGT_OSD, MSGL_DBG2, "font: resampling alpha by factor %5.3f (%d) ",factor,f);fflush(stdout); |
215 | 271 for(j=0;j<size;j++){ |
947
76fd9463b9d3
FAST_OSD option to disable font outline antialiasing
arpi_esp
parents:
728
diff
changeset
|
272 int x=desc->pic_a[i]->bmp[j]; // alpha |
76fd9463b9d3
FAST_OSD option to disable font outline antialiasing
arpi_esp
parents:
728
diff
changeset
|
273 int y=desc->pic_b[i]->bmp[j]; // bitmap |
76fd9463b9d3
FAST_OSD option to disable font outline antialiasing
arpi_esp
parents:
728
diff
changeset
|
274 |
76fd9463b9d3
FAST_OSD option to disable font outline antialiasing
arpi_esp
parents:
728
diff
changeset
|
275 #ifdef FAST_OSD |
76fd9463b9d3
FAST_OSD option to disable font outline antialiasing
arpi_esp
parents:
728
diff
changeset
|
276 x=(x<(255-f))?0:1; |
76fd9463b9d3
FAST_OSD option to disable font outline antialiasing
arpi_esp
parents:
728
diff
changeset
|
277 #else |
249 | 278 |
250 | 279 x=255-((x*f)>>8); // scale |
280 //if(x<0) x=0; else if(x>255) x=255; | |
281 //x^=255; // invert | |
282 | |
249 | 283 if(x+y>255) x=255-y; // to avoid overflows |
284 | |
285 //x=0; | |
286 //x=((x*f*(255-y))>>16); | |
287 //x=((x*f*(255-y))>>16)+y; | |
215 | 288 //x=(x*f)>>8;if(x<y) x=y; |
250 | 289 |
249 | 290 if(x<1) x=1; else |
291 if(x>=252) x=0; | |
947
76fd9463b9d3
FAST_OSD option to disable font outline antialiasing
arpi_esp
parents:
728
diff
changeset
|
292 #endif |
250 | 293 |
215 | 294 desc->pic_a[i]->bmp[j]=x; |
250 | 295 // desc->pic_b[i]->bmp[j]=0; // hack |
215 | 296 } |
13897
41a4fc8421e9
Converted printf calls to mp_msg, reduced verbosity.
diego
parents:
13641
diff
changeset
|
297 mp_msg(MSGT_OSD, MSGL_DBG2, "DONE!\n"); |
215 | 298 } |
213 | 299 if(!desc->height) desc->height=desc->pic_a[i]->h; |
300 } | |
301 | |
302 j='_';if(desc->font[j]<0) j='?'; | |
12609
4be019266884
array initialization fix by SungKwanKang <ksquarekr at yahoo.com>
faust3
parents:
10272
diff
changeset
|
303 for(i=0;i<65536;i++) |
213 | 304 if(desc->font[i]<0){ |
305 desc->start[i]=desc->start[j]; | |
306 desc->width[i]=desc->width[j]; | |
307 desc->font[i]=desc->font[j]; | |
308 } | |
309 desc->font[' ']=-1; | |
310 desc->width[' ']=desc->spacewidth; | |
311 | |
13897
41a4fc8421e9
Converted printf calls to mp_msg, reduced verbosity.
diego
parents:
13641
diff
changeset
|
312 mp_msg(MSGT_OSD, MSGL_V, "Font %s loaded successfully! (%d chars)\n",fname,chardb); |
213 | 313 |
314 return desc; | |
13641 | 315 |
316 fail_out: | |
317 if (f) | |
318 fclose(f); | |
319 if (desc->fpath) | |
320 free(desc->fpath); | |
321 if (desc->name) | |
322 free(desc->name); | |
323 if (desc) | |
324 free(desc); | |
325 return NULL; | |
213 | 326 } |
327 | |
328 #if 0 | |
329 int main(){ | |
330 | |
339 | 331 read_font_desc("high_arpi.desc",1); |
213 | 332 |
333 } | |
334 #endif | |
7122
0dc9cb756b68
freetype 2.0/2.1+ support - disabled by default until bugs fixed
arpi
parents:
5928
diff
changeset
|
335 |