Revision 192
added zoom/scale
font.c | ||
---|---|---|
72 | 72 |
free(ret); |
73 | 73 |
return NULL; |
74 | 74 |
} |
75 |
int good = false; |
|
75 | 76 |
char filepath[1024]; |
76 | 77 |
for(size_t i = 0; i < ret->nchars; ++i){ |
77 | 78 |
sprintf(filepath, "%s/ascii%03d.xpm2", s, i); |
78 | 79 |
char **xpm = xpm_load_xpm2(filepath); |
79 | 80 |
ret->glyphs[i] = glyph_ctor((const char**)xpm); |
81 |
if(ret->glyphs[i] != NULL) good = true; |
|
80 | 82 |
} |
81 |
return ret; |
|
83 |
if(good) return ret; |
|
84 |
else{ |
|
85 |
//font_dtor(ret); |
|
86 |
return NULL; |
|
87 |
} |
|
82 | 88 |
} |
83 | 89 |
void (font_dtor)(font_t *p){ |
84 | 90 |
if(p == NULL) return; |
Also available in: Unified diff