removed unused assignment to fontpath

master
tabe 2009-04-20 08:58:14 +00:00
parent 3316a4db43
commit 80030df996
6 changed files with 36 additions and 3 deletions

View File

@ -960,8 +960,6 @@ BGD_DECLARE(char *) gdImageStringFTEx (gdImage * im, int *brect, int fg, char *f
/* 2.0.29: we can return the font path if desired */
if (strex->flags & gdFTEX_RETURNFONTPATHNAME)
strex->fontpath = strdup(font->fontpath);
else
strex->fontpath = 0;
}
matrix.xx = (FT_Fixed) (cos_a * (1 << 16));

View File

@ -47,6 +47,7 @@ if (BUILD_TEST)
gdimagefilltoborder
freetype
xpm
gdimagestringftex
)
IF (WIN32)

View File

@ -1,7 +1,7 @@
## Process this file with automake to produce Makefile.in -*-Makefile-*-
AUTOMAKE_OPTIONS = foreign 1.7
SUBDIRS = gd2 gdimagecolordeallocate gdimagecolortransparent gdimagefill gdimagefilltoborder gdtest jpeg gdimagearc gdimagecolorexact gdimagecopy gdimagefilledellipse gdimageline gdimagepixelate gdtiled freetype gdimagecolorclosest gdimagecolorreplace gdimagecolorresolve gdimagecopyrotated gdimagefilledrectangle gdimagerectangle gdimagesetpixel gif png xpm
SUBDIRS = gd2 gdimagecolordeallocate gdimagecolortransparent gdimagefill gdimagefilltoborder gdtest jpeg gdimagearc gdimagecolorexact gdimagecopy gdimagefilledellipse gdimageline gdimagepixelate gdtiled freetype gdimagecolorclosest gdimagecolorreplace gdimagecolorresolve gdimagecopyrotated gdimagefilledrectangle gdimagerectangle gdimagesetpixel gif png xpm gdimagestringftex
EXTRA_DIST = CMakeLists.txt

View File

@ -0,0 +1,10 @@
SET(TESTS_FILES
gdimagestringftex_returnfontpathname
)
FOREACH(test_name ${TESTS_FILES})
add_executable(${test_name} "${test_name}.c")
target_link_libraries (${test_name} ${GDTESTS_TARGET_LINK})
get_target_property(test_path ${test_name} LOCATION)
ADD_TEST(${test_name} ${test_path})
ENDFOREACH(test_name)

View File

@ -0,0 +1,3 @@
## Process this file with automake to produce Makefile.in -*-Makefile-*-
EXTRA_DIST = CMakeLists.txt gdimagestringftex_returnfontpathname.c

View File

@ -0,0 +1,21 @@
#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;
}