Skip to content

Commit f5aa69a

Browse files
authored
Port "merged and expanded settings from gd.h and gdft.c" (GH-17367)
This commit[1] and the related part of the Netware removal[2] move the related definitions out of gd.h, and bring some updates. [1] <libgd/libgd@2a921c8> [2] <libgd/libgd@e6bb110>
1 parent cc84d27 commit f5aa69a

File tree

2 files changed

+16
-20
lines changed

2 files changed

+16
-20
lines changed

ext/gd/libgd/gd.h

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,6 @@ extern "C" {
1717
#define GD_EXTRA_VERSION ""
1818
#define GD_VERSION_STRING "2.0.35"
1919

20-
#ifdef NETWARE
21-
/* default fontpath for netware systems */
22-
#define DEFAULT_FONTPATH "sys:/java/nwgfx/lib/x11/fonts/ttf;."
23-
#define PATHSEPARATOR ";"
24-
#elif defined(_WIN32)
25-
/* default fontpath for windows systems */
26-
#define DEFAULT_FONTPATH "c:\\winnt\\fonts;c:\\windows\\fonts;."
27-
#define PATHSEPARATOR ";"
28-
#else
29-
/* default fontpath for unix systems */
30-
#define DEFAULT_FONTPATH "/usr/X11R6/lib/X11/fonts/TrueType:/usr/X11R6/lib/X11/fonts/truetype:/usr/X11R6/lib/X11/fonts/TTF:/usr/share/fonts/TrueType:/usr/share/fonts/truetype:/usr/openwin/lib/X11/fonts/TrueType:/usr/X11R6/lib/X11/fonts/Type1:."
31-
#define PATHSEPARATOR ":"
32-
#endif
33-
3420
/* gd.h: declarations file for the graphic-draw module.
3521
* Permission to use, copy, modify, and distribute this software and its
3622
* documentation for any purpose and without fee is hereby granted, provided

ext/gd/libgd/gdft.c

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,17 +90,27 @@ gdImageStringFT (gdImage * im, int *brect, int fg, char *fontlist,
9090
* some last resort values that might match some Un*x system
9191
* if building this version of gd separate from graphviz.
9292
*/
93+
9394
#ifndef DEFAULT_FONTPATH
94-
#if defined(__APPLE__) || (defined(__MWERKS__) && defined(macintosh))
95-
#define DEFAULT_FONTPATH "/usr/share/fonts/truetype:/System/Library/Fonts:/Library/Fonts"
96-
#else
97-
#define DEFAULT_FONTPATH "/usr/share/fonts/truetype"
98-
#endif
95+
# if defined(_WIN32)
96+
# define DEFAULT_FONTPATH "C:\\WINDOWS\\FONTS;C:\\WINNT\\FONTS"
97+
# elif defined(__APPLE__) || (defined(__MWERKS__) && defined(macintosh))
98+
# define DEFAULT_FONTPATH "/usr/share/fonts/truetype:/System/Library/Fonts:/Library/Fonts"
99+
# else
100+
/* default fontpath for unix systems - whatever happened to standards ! */
101+
# define DEFAULT_FONTPATH "/usr/X11R6/lib/X11/fonts/TrueType:/usr/X11R6/lib/X11/fonts/truetype:/usr/X11R6/lib/X11/fonts/TTF:/usr/share/fonts/TrueType:/usr/share/fonts/truetype:/usr/openwin/lib/X11/fonts/TrueType:/usr/X11R6/lib/X11/fonts/Type1:/usr/lib/X11/fonts/Type1:/usr/openwin/lib/X11/fonts/Type1"
102+
# endif
99103
#endif
104+
100105
#ifndef PATHSEPARATOR
101-
#define PATHSEPARATOR ":"
106+
# if defined(_WIN32)
107+
# define PATHSEPARATOR ";"
108+
# else
109+
# define PATHSEPARATOR ":"
110+
# endif
102111
#endif
103112

113+
104114
#ifndef TRUE
105115
#define FALSE 0
106116
#define TRUE !FALSE

0 commit comments

Comments
 (0)