allow full paths for font names too..

SVN revision: 1862
This commit is contained in:
Carsten Haitzler 2000-01-06 05:58:15 +00:00
parent cd46864984
commit cb1be843d7
1 changed files with 9 additions and 3 deletions

View File

@ -176,19 +176,25 @@ __imlib_load_font(char *fontname)
free(name);
return NULL;
}
sprintf(tmp, "%s/%s.ttf", fpath[j], name);
sprintf(tmp, "%s.ttf", name);
if (__imlib_FileIsFile(tmp))
file = strdup(tmp);
else
{
sprintf(tmp, "%s/%s.TTF", fpath[j], name);
sprintf(tmp, "%s/%s.ttf", fpath[j], name);
if (__imlib_FileIsFile(tmp))
file = strdup(tmp);
else
{
sprintf(tmp, "%s/%s", fpath[j], name);
sprintf(tmp, "%s/%s.TTF", fpath[j], name);
if (__imlib_FileIsFile(tmp))
file = strdup(tmp);
else
{
sprintf(tmp, "%s/%s", fpath[j], name);
if (__imlib_FileIsFile(tmp))
file = strdup(tmp);
}
}
}
free(tmp);