From 41efb503bf119abfad8c3fdfaf37b1d2fed7d48b Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Nov 07 2017 16:08:11 +0000 Subject: fix URW font handling (thanks to Yaakov Selkowitz) --- diff --git a/xpdf-4.00-urw-base35-fonts.patch b/xpdf-4.00-urw-base35-fonts.patch new file mode 100644 index 0000000..c6f10ba --- /dev/null +++ b/xpdf-4.00-urw-base35-fonts.patch @@ -0,0 +1,54 @@ +--- xpdf-4.00/xpdf/GlobalParams.cc.orig 2017-08-08 18:22:50.000000000 -0500 ++++ xpdf-4.00/xpdf/GlobalParams.cc 2017-11-06 03:18:35.636604800 -0600 +@@ -78,20 +78,20 @@ static struct { + const char *obliqueFont; // name of font to oblique + double obliqueFactor; // oblique sheer factor + } displayFontTab[] = { +- {"Courier", "n022003l.pfb", "cour.ttf", "Courier", "Courier", NULL, 0}, +- {"Courier-Bold", "n022004l.pfb", "courbd.ttf", "Courier", "Courier Bold", NULL, 0}, +- {"Courier-BoldOblique", "n022024l.pfb", "courbi.ttf", "Courier", "Courier Bold Oblique", "Courier-Bold", 0.212557}, +- {"Courier-Oblique", "n022023l.pfb", "couri.ttf", "Courier", "Courier Oblique", "Courier", 0.212557}, +- {"Helvetica", "n019003l.pfb", "arial.ttf", "Helvetica", "Helvetica", NULL, 0}, +- {"Helvetica-Bold", "n019004l.pfb", "arialbd.ttf", "Helvetica", "Helvetica-Bold", NULL, 0}, +- {"Helvetica-BoldOblique", "n019024l.pfb", "arialbi.ttf", "Helvetica", "Helvetica Bold Oblique", "Helvetica-Bold", 0.212557}, +- {"Helvetica-Oblique", "n019023l.pfb", "ariali.ttf", "Helvetica", "Helvetica Oblique", "Helvetica", 0.212557}, +- {"Symbol", "s050000l.pfb", NULL, "Symbol", "Symbol", NULL, 0}, +- {"Times-Bold", "n021004l.pfb", "timesbd.ttf", "Times", "Times-Bold", NULL, 0}, +- {"Times-BoldItalic", "n021024l.pfb", "timesbi.ttf", "Times", "Times-BoldItalic", NULL, 0}, +- {"Times-Italic", "n021023l.pfb", "timesi.ttf", "Times", "Times-Italic", NULL, 0}, +- {"Times-Roman", "n021003l.pfb", "times.ttf", "Times", "Times-Roman", NULL, 0}, +- {"ZapfDingbats", "d050000l.pfb", NULL, "ZapfDingbats", "Zapf Dingbats", NULL, 0}, ++ {"Courier", "NimbusMonoPS-Regular.t1", "cour.ttf", "Courier", "Courier", NULL, 0}, ++ {"Courier-Bold", "NimbusMonoPS-Bold.t1", "courbd.ttf", "Courier", "Courier Bold", NULL, 0}, ++ {"Courier-BoldOblique", "NimbusMonoPS-BoldItalic.t1", "courbi.ttf", "Courier", "Courier Bold Oblique", "Courier-Bold", 0.212557}, ++ {"Courier-Oblique", "NimbusMonoPS-Italic.t1", "couri.ttf", "Courier", "Courier Oblique", "Courier", 0.212557}, ++ {"Helvetica", "NimbusSans-Regular.t1", "arial.ttf", "Helvetica", "Helvetica", NULL, 0}, ++ {"Helvetica-Bold", "NimbusSans-Bold.t1", "arialbd.ttf", "Helvetica", "Helvetica-Bold", NULL, 0}, ++ {"Helvetica-BoldOblique", "NimbusSans-BoldItalic.t1", "arialbi.ttf", "Helvetica", "Helvetica Bold Oblique", "Helvetica-Bold", 0.212557}, ++ {"Helvetica-Oblique", "NimbusSans-Italic.t1", "ariali.ttf", "Helvetica", "Helvetica Oblique", "Helvetica", 0.212557}, ++ {"Symbol", "StandardSymbolsPS.t1", NULL, "Symbol", "Symbol", NULL, 0}, ++ {"Times-Bold", "NimbusRoman-Bold.t1", "timesbd.ttf", "Times", "Times-Bold", NULL, 0}, ++ {"Times-BoldItalic", "NimbusRoman-BoldItalic.t1", "timesbi.ttf", "Times", "Times-BoldItalic", NULL, 0}, ++ {"Times-Italic", "NimbusRoman-Italic.t1", "timesi.ttf", "Times", "Times-Italic", NULL, 0}, ++ {"Times-Roman", "NimbusRoman-Regular.t1", "times.ttf", "Times", "Times-Roman", NULL, 0}, ++ {"ZapfDingbats", "D050000L.t1", NULL, "ZapfDingbats", "Zapf Dingbats", NULL, 0}, + {NULL} + }; + +@@ -103,6 +103,7 @@ static const char *displayFontDirs[] = { + }; + #else + static const char *displayFontDirs[] = { ++ "/usr/share/fonts/urw-base35", + "/usr/share/ghostscript/fonts", + "/usr/local/share/ghostscript/fonts", + "/usr/share/fonts/default/Type1", +@@ -2213,7 +2216,7 @@ FILE *GlobalParams::findToUnicodeFile(GS + } + + GString *GlobalParams::findFontFile(GString *fontName) { +- static const char *exts[] = { ".pfa", ".pfb", ".ttf", ".ttc" }; ++ static const char *exts[] = { ".pfa", ".pfb", ".t1", ".ttf", ".ttc" }; + GString *path, *dir; + #ifdef _WIN32 + GString *fontNameU; diff --git a/xpdf.spec b/xpdf.spec index 21047e6..87b11b9 100644 --- a/xpdf.spec +++ b/xpdf.spec @@ -1,7 +1,7 @@ Summary: A PDF file viewer for the X Window System Name: xpdf Version: 4.00 -Release: 2%{?dist} +Release: 3%{?dist} License: (GPLv2 or GPLv3) and BSD Epoch: 1 Url: http://www.xpdfreader.com/ @@ -53,6 +53,7 @@ Patch15: xpdf-3.04-nocmap.patch Patch23: xpdf-4.00-libpaperfix.patch Patch24: xpdf-4.00-man-path-fix.patch Patch25: xpdf-4.00-versionedlib.patch +Patch26: xpdf-4.00-urw-base35-fonts.patch # Security patches @@ -107,6 +108,7 @@ Development files for xpdf libraries. %patch23 -p1 -b .paperfix %patch24 -p1 -b .manfix %patch25 -p1 -b .versionedlib +%patch26 -p1 -b .urw-font-fix # security patches @@ -290,6 +292,9 @@ update-desktop-database &> /dev/null ||: %{_libdir}/lib*.so %changelog +* Tue Nov 7 2017 Tom Callaway - 1:4.00-3 +- fix URW font handling (thanks to Yaakov Selkowitz) + * Wed Aug 23 2017 Tom Callaway 1:4.00-2 - fix macro typo