Skip to content

Port "merged and expanded settings from gd.h and gdft.c" #17367

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions ext/gd/libgd/gd.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,6 @@ extern "C" {
#define GD_EXTRA_VERSION ""
#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.
* Permission to use, copy, modify, and distribute this software and its
* documentation for any purpose and without fee is hereby granted, provided
Expand Down
22 changes: 16 additions & 6 deletions ext/gd/libgd/gdft.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,17 +90,27 @@ gdImageStringFT (gdImage * im, int *brect, int fg, char *fontlist,
* some last resort values that might match some Un*x system
* if building this version of gd separate from graphviz.
*/

#ifndef DEFAULT_FONTPATH
#if defined(__APPLE__) || (defined(__MWERKS__) && defined(macintosh))
#define DEFAULT_FONTPATH "/usr/share/fonts/truetype:/System/Library/Fonts:/Library/Fonts"
#else
#define DEFAULT_FONTPATH "/usr/share/fonts/truetype"
#endif
# if defined(_WIN32)
# define DEFAULT_FONTPATH "C:\\WINDOWS\\FONTS;C:\\WINNT\\FONTS"
# elif defined(__APPLE__) || (defined(__MWERKS__) && defined(macintosh))
# define DEFAULT_FONTPATH "/usr/share/fonts/truetype:/System/Library/Fonts:/Library/Fonts"
# 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

#ifndef PATHSEPARATOR
#define PATHSEPARATOR ":"
# if defined(_WIN32)
# define PATHSEPARATOR ";"
# else
# define PATHSEPARATOR ":"
# endif
#endif


#ifndef TRUE
#define FALSE 0
#define TRUE !FALSE
Expand Down
Loading