parent
c62a952fd6
commit
7981dbc822
|
@ -77,8 +77,7 @@ TextStateLoadFont(TextState * ts)
|
||||||
if (ss)
|
if (ss)
|
||||||
{
|
{
|
||||||
*ss = ' ';
|
*ss = ' ';
|
||||||
word(s2, 1, w);
|
word(s2, 1, s);
|
||||||
sprintf(s, "%s.ttf", w);
|
|
||||||
word(s2, 2, w);
|
word(s2, 2, w);
|
||||||
ts->efont = Efont_load(s, atoi(w));
|
ts->efont = Efont_load(s, atoi(w));
|
||||||
if (ts->efont)
|
if (ts->efont)
|
||||||
|
|
|
@ -125,9 +125,8 @@ _ift_Load(TextState * ts, const char *name __UNUSED__)
|
||||||
if (len > 1000)
|
if (len > 1000)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
Esnprintf(s, sizeof(s) - 8, "%s.ttf", ts->fontname);
|
memcpy(s, ts->fontname, len);
|
||||||
strncpy(s, ts->fontname, len);
|
s[len] = '\0';
|
||||||
strcpy(s + len, ".ttf");
|
|
||||||
font = Efont_load(s, atoi(ss + 1));
|
font = Efont_load(s, atoi(ss + 1));
|
||||||
if (!font)
|
if (!font)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
Loading…
Reference in New Issue