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,6 +176,11 @@ __imlib_load_font(char *fontname)
free(name);
return NULL;
}
sprintf(tmp, "%s.ttf", name);
if (__imlib_FileIsFile(tmp))
file = strdup(tmp);
else
{
sprintf(tmp, "%s/%s.ttf", fpath[j], name);
if (__imlib_FileIsFile(tmp))
file = strdup(tmp);
@ -191,6 +196,7 @@ __imlib_load_font(char *fontname)
file = strdup(tmp);
}
}
}
free(tmp);
}
free(name);