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] <2a921c80fb>
[2] <e6bb110663>
This commit is contained in:
Christoph M. Becker 2025-01-06 15:01:50 +01:00 committed by GitHub
parent cc84d271ea
commit f5aa69a5fc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 16 additions and 20 deletions

View file

@ -17,20 +17,6 @@ extern "C" {
#define GD_EXTRA_VERSION "" #define GD_EXTRA_VERSION ""
#define GD_VERSION_STRING "2.0.35" #define GD_VERSION_STRING "2.0.35"
#ifdef NETWARE
/* default fontpath for netware systems */
#define DEFAULT_FONTPATH "sys:/java/nwgfx/lib/x11/fonts/ttf;."
#define PATHSEPARATOR ";"
#elif defined(_WIN32)
/* default fontpath for windows systems */
#define DEFAULT_FONTPATH "c:\\winnt\\fonts;c:\\windows\\fonts;."
#define PATHSEPARATOR ";"
#else
/* default fontpath for unix systems */
#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:."
#define PATHSEPARATOR ":"
#endif
/* gd.h: declarations file for the graphic-draw module. /* gd.h: declarations file for the graphic-draw module.
* Permission to use, copy, modify, and distribute this software and its * Permission to use, copy, modify, and distribute this software and its
* documentation for any purpose and without fee is hereby granted, provided * documentation for any purpose and without fee is hereby granted, provided

View file

@ -90,17 +90,27 @@ gdImageStringFT (gdImage * im, int *brect, int fg, char *fontlist,
* some last resort values that might match some Un*x system * some last resort values that might match some Un*x system
* if building this version of gd separate from graphviz. * if building this version of gd separate from graphviz.
*/ */
#ifndef DEFAULT_FONTPATH #ifndef DEFAULT_FONTPATH
#if defined(__APPLE__) || (defined(__MWERKS__) && defined(macintosh)) # if defined(_WIN32)
#define DEFAULT_FONTPATH "/usr/share/fonts/truetype:/System/Library/Fonts:/Library/Fonts" # define DEFAULT_FONTPATH "C:\\WINDOWS\\FONTS;C:\\WINNT\\FONTS"
#else # elif defined(__APPLE__) || (defined(__MWERKS__) && defined(macintosh))
#define DEFAULT_FONTPATH "/usr/share/fonts/truetype" # define DEFAULT_FONTPATH "/usr/share/fonts/truetype:/System/Library/Fonts:/Library/Fonts"
#endif # else
/* default fontpath for unix systems - whatever happened to standards ! */
# 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"
# endif
#endif #endif
#ifndef PATHSEPARATOR #ifndef PATHSEPARATOR
#define PATHSEPARATOR ":" # if defined(_WIN32)
# define PATHSEPARATOR ";"
# else
# define PATHSEPARATOR ":"
# endif
#endif #endif
#ifndef TRUE #ifndef TRUE
#define FALSE 0 #define FALSE 0
#define TRUE !FALSE #define TRUE !FALSE