diff options
Diffstat (limited to 'Build/source/libs/gd/libgd-src/tests/freetype/bug00132.c')
-rw-r--r-- | Build/source/libs/gd/libgd-src/tests/freetype/bug00132.c | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/Build/source/libs/gd/libgd-src/tests/freetype/bug00132.c b/Build/source/libs/gd/libgd-src/tests/freetype/bug00132.c new file mode 100644 index 00000000000..88cdfc695a3 --- /dev/null +++ b/Build/source/libs/gd/libgd-src/tests/freetype/bug00132.c @@ -0,0 +1,42 @@ +/* $Id$ */ + +#include "gd.h" +#include <stdio.h> +#include <stdlib.h> +#include "gdtest.h" +#include "gdfontl.h" + +int main() +{ + gdImagePtr im; + int error = 0; + char path[2048]; + const char *file_exp = "bug00132_exp.png"; + char *ret = NULL; + + im = gdImageCreateTrueColor(50, 30); + + if (!im) { + printf("can't get truecolor image\n"); + return 1; + } + + gdImageAlphaBlending(im, 0); + gdImageFilledRectangle(im, 0, 0, 200, 200, gdTrueColorAlpha(0, 0, 0, 127)); + + sprintf(path, "%s/freetype/DejaVuSans.ttf", GDTEST_TOP_DIR); + + ret = gdImageStringFT(im, NULL, - 0xFFFFFF, path, 14.0, 0.0, 10, 20, "ϑ θ"); + if (ret) { + error = 1; + printf("%s\n", ret); + } else { + sprintf(path, "%s/freetype/%s", GDTEST_TOP_DIR, file_exp); + if (!gdAssertImageEqualsToFile(path, im)) { + error = 1; + printf("Reference image and destination differ\n"); + } + } + gdImageDestroy(im); + return error; +} |