1 From abd57e6f4300dd10e13930076f7d11ca3f08c2cd Mon Sep 17 00:00:00 2001
2 From: Nick Bowler <nbowler@draconx.ca>
3 Subject: [PATCH] Add Gentoo font paths to default search dir.
5 This allows Xpdf to automatically find the required type-1 fonts on
6 Gentoo. The font paths can also be set in xpdfrc, but this approach
7 is more robust as the user's xpdfrc overrides the system-wide one.
9 The newly added paths respect datarootdir to better support prefixed
12 xpdf/GlobalParams.cc | 2 ++
13 xpdf/Makefile.in | 3 ++-
14 2 files changed, 4 insertions(+), 1 deletion(-)
16 diff --git a/xpdf/GlobalParams.cc b/xpdf/GlobalParams.cc
17 index ea7e9fd9d142..19e04114adb4 100644
18 --- a/xpdf/GlobalParams.cc
19 +++ b/xpdf/GlobalParams.cc
20 @@ -120,6 +120,8 @@ static const char *displayFontDirs[] = {
23 static const char *displayFontDirs[] = {
24 + DATAROOTDIR "/fonts/urw-fonts",
25 + DATAROOTDIR "/fonts/Type1",
26 "/usr/share/ghostscript/fonts",
27 "/usr/local/share/ghostscript/fonts",
28 "/usr/share/fonts/default/Type1",
29 diff --git a/xpdf/Makefile.in b/xpdf/Makefile.in
30 index de3e6766e60a..d7118b7053a1 100644
31 --- a/xpdf/Makefile.in
32 +++ b/xpdf/Makefile.in
37 +datarootdir = @datarootdir@
41 @@ -19,7 +20,7 @@ FOFILIBDIR = ../fofi
42 SPLASHSRCDIR = $(srcdir)/../splash
43 SPLASHLIBDIR = ../splash
45 -CXXFLAGS = @CXXFLAGS@ @DEFS@ -I.. -I$(srcdir)/.. -I$(GOOSRCDIR) -I$(FOFISRCDIR) -I$(SPLASHSRCDIR) -I$(srcdir) @freetype2_CFLAGS@ @Sgm_CFLAGS@ @Xm_CFLAGS@ @Xt_CFLAGS@ @Xp_CFLAGS@ @Xext_CFLAGS@ @Xpm_CFLAGS@ @libpng_CFLAGS@ @libpaper_CFLAGS@ @X_CFLAGS@ @EXTRA_CFLAGS@
46 +CXXFLAGS = @CXXFLAGS@ @DEFS@ -DDATAROOTDIR=\"$(datarootdir)\" -I.. -I$(srcdir)/.. -I$(GOOSRCDIR) -I$(FOFISRCDIR) -I$(SPLASHSRCDIR) -I$(srcdir) @freetype2_CFLAGS@ @Sgm_CFLAGS@ @Xm_CFLAGS@ @Xt_CFLAGS@ @Xp_CFLAGS@ @Xext_CFLAGS@ @Xpm_CFLAGS@ @libpng_CFLAGS@ @libpaper_CFLAGS@ @X_CFLAGS@ @EXTRA_CFLAGS@