blob: f91485b7717c1d518d79c83dcbb2307f5b003e03 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#include <string.h>
#include "gd.h"
#include "gdtest.h"
int main()
{
gdFTStringExtra strex;
char path[2048];
sprintf(path, "%s/freetype/DejaVuSans.ttf", GDTEST_TOP_DIR);
strex.flags = gdFTEX_RETURNFONTPATHNAME;
strex.fontpath = NULL;
gdImageStringFTEx(NULL, NULL, 0, path, 72, 0, 0, 0, "hello, gd", &strex);
if (!strex.fontpath) {
return 1;
}
if (strcmp(path, strex.fontpath) != 0) {
return 2;
}
gdFree(strex.fontpath);
return 0;
}
|