]> granicus.if.org Git - graphviz/commitdiff
Use dllimport to link gd fonts on Windows
authorErwin Janssen <erwinjanssen@outlook.com>
Mon, 27 Mar 2017 20:53:07 +0000 (22:53 +0200)
committerErwin Janssen <erwinjanssen@outlook.com>
Tue, 28 Mar 2017 08:45:51 +0000 (10:45 +0200)
Using extern to link the gd fonts on Windows doesn't work, they should be
imported from the DLL using __declspec(dllimport).
Also update the libgd DLL to the most recent version.

plugin/gd/gvrender_gd.c
windows/dependencies/libraries

index f989d002e5d72a2c0a0c4d03c8de70095acc8d58..5008754f038c6ac85174de639a3ad09d70161c9a 100644 (file)
@@ -293,7 +293,12 @@ static void gdgen_missingfont(char *err, char *fontreq)
 /* fontsize at which text is rendered by a simple line */
 #define FONTSIZE_TOO_SMALL 1.5
 
-extern gdFontPtr gdFontTiny, gdFontSmall, gdFontMediumBold, gdFontLarge, gdFontGiant;
+#ifdef _WIN32
+#   define GD_IMPORT __declspec(dllimport)
+#else
+#   define GD_IMPORT extern
+#endif
+GD_IMPORT gdFontPtr gdFontTiny, gdFontSmall, gdFontMediumBold, gdFontLarge, gdFontGiant;
 
 void gdgen_text(gdImagePtr im, pointf spf, pointf epf, int fontcolor, double fontsize, int fontdpi, double fontangle, char *fontname, char *str)
 {
index 95a696430d3c5ac67c3c122f951e42282bec5c86..7cb2b3437a3d104d869a534a780805b27d086a6a 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 95a696430d3c5ac67c3c122f951e42282bec5c86
+Subproject commit 7cb2b3437a3d104d869a534a780805b27d086a6a