imlib2/ttf loading tweaks.

SVN revision: 38363
This commit is contained in:
Kim Woelders 2008-12-30 22:40:05 +00:00
parent c62a952fd6
commit 7981dbc822
2 changed files with 3 additions and 5 deletions

View File

@ -77,8 +77,7 @@ TextStateLoadFont(TextState * ts)
if (ss)
{
*ss = ' ';
word(s2, 1, w);
sprintf(s, "%s.ttf", w);
word(s2, 1, s);
word(s2, 2, w);
ts->efont = Efont_load(s, atoi(w));
if (ts->efont)

View File

@ -125,9 +125,8 @@ _ift_Load(TextState * ts, const char *name __UNUSED__)
if (len > 1000)
return -1;
Esnprintf(s, sizeof(s) - 8, "%s.ttf", ts->fontname);
strncpy(s, ts->fontname, len);
strcpy(s + len, ".ttf");
memcpy(s, ts->fontname, len);
s[len] = '\0';
font = Efont_load(s, atoi(ss + 1));
if (!font)
return -1;