From 40941192cf18f4b977392e8b4bbe3ead92f971ab Mon Sep 17 00:00:00 2001 From: erg Date: Fri, 8 Jun 2007 22:10:54 +0000 Subject: [PATCH] Fix ps_font_equiv.h for systems that don't have fontconfig setup to run off of ghostscript. At present, this means allowing Windows to use the fonts in the windows system font directory. --- lib/common/Makefile.am | 3 ++- lib/common/Makefile.old | 5 +++-- lib/common/ps_font_equiv.txt | 42 ++++++++++++++++++------------------ lib/common/ps_fontmap.txt | 14 ++++++++++++ 4 files changed, 40 insertions(+), 24 deletions(-) create mode 100644 lib/common/ps_fontmap.txt diff --git a/lib/common/Makefile.am b/lib/common/Makefile.am index 3bcb8e891..448c086b5 100644 --- a/lib/common/Makefile.am +++ b/lib/common/Makefile.am @@ -32,7 +32,8 @@ libcommon_C_la_SOURCES = arrows.c colxlate.c fontmetrics.c \ fontmetrics.o fontmetrics.lo: ps_font_equiv.h # ensure font names are properly sorted for bsearch operation -ps_font_equiv.h: $(srcdir)/ps_font_equiv.txt $(srcdir)/fontmap.cfg +ps_font_equiv.h: $(srcdir)/ps_font_equiv.txt $(srcdir)/fontmap.cfg $(srcdir)/ps_fontmap.txt + cp ps_fontmap.txt ps_font_equiv.h ./mksvgfonts.pl fontmap.cfg ps_font_equiv.txt | LC_ALL=C $(SORT) >ps_font_equiv.h utils.o utils.lo : ps.h diff --git a/lib/common/Makefile.old b/lib/common/Makefile.old index 058f2279c..a783d88ea 100644 --- a/lib/common/Makefile.old +++ b/lib/common/Makefile.old @@ -64,8 +64,9 @@ htmlparse.o htmllex.o : htmllex.h fontmetrics.o: ps_font_equiv.h # ensure font names are properly sorted for bsearch operation -ps_font_equiv.h: ps_font_equiv.txt - ./mksvgfonts.pl fontmap.cfg ps_font_equiv.txt | LC_ALL=C $(SORT) >ps_font_equiv.h +ps_font_equiv.h: ps_font_equiv.txt ps_fontmap.txt ps_fontmap.txt + cp ps_fontmap.txt ps_font_equiv.h + ./mksvgfonts.pl fontmap.cfg ps_font_equiv.txt | LC_ALL=C $(SORT) >>ps_font_equiv.h ps.h : ps.txt $(AWK) -f $(AWKDIR)/stringize.awk ps.txt > ps.h diff --git a/lib/common/ps_font_equiv.txt b/lib/common/ps_font_equiv.txt index 1ecbbbbc5..678a196a0 100644 --- a/lib/common/ps_font_equiv.txt +++ b/lib/common/ps_font_equiv.txt @@ -6,30 +6,30 @@ {"Bookman-DemiItalic", "URW Bookman L", "demi", 0, "italic", 11}, {"Bookman-Light", "URW Bookman L", "light", 0, 0, 8 }, {"Bookman-LightItalic", "URW Bookman L", "light", 0, "italic", 9 }, -{"Courier", "Nimbus Mono L", "regular", 0, 0, 12}, -{"Courier-Bold", "Nimbus Mono L", "bold", 0, 0, 14}, -{"Courier-BoldOblique", "Nimbus Mono L", "bold", 0, "oblique", 15}, -{"Courier-Oblique", "Nimbus Mono L", "regular", 0, "oblique", 13}, -{"Helvetica", "Nimbus Sans L", "regular", 0, 0, 16}, -{"Helvetica-Bold", "Nimbus Sans L", "bold", 0, 0, 18}, -{"Helvetica-BoldOblique", "Nimbus Sans L", "bold", 0, "oblique", 19}, -{"Helvetica-Narrow", "Nimbus Sans L", "regular", "condensed", 0, 20}, -{"Helvetica-Narrow-Bold", "Nimbus Sans L", "bold", "condensed", 0, 22}, -{"Helvetica-Narrow-BoldOblique","Nimbus Sans L", "bold", "condensed", "oblique", 23}, -{"Helvetica-Narrow-Oblique", "Nimbus Sans L", "regular", "condensed", "oblique", 21}, -{"Helvetica-Oblique", "Nimbus Sans L", "regular", 0, "oblique", 17}, +{"Courier", COURIER, "regular", 0, 0, 12}, +{"Courier-Bold", COURIER, "bold", 0, 0, 14}, +{"Courier-BoldOblique", COURIER, "bold", 0, "oblique", 15}, +{"Courier-Oblique", COURIER, "regular", 0, "oblique", 13}, +{"Helvetica", HELVETICA, "regular", 0, 0, 16}, +{"Helvetica-Bold", HELVETICA, "bold", 0, 0, 18}, +{"Helvetica-BoldOblique", HELVETICA, "bold", 0, "oblique", 19}, +{"Helvetica-Narrow", HELVETICA, "regular", "condensed", 0, 20}, +{"Helvetica-Narrow-Bold", HELVETICA, "bold", "condensed", 0, 22}, +{"Helvetica-Narrow-BoldOblique",HELVETICA, "bold", "condensed", "oblique", 23}, +{"Helvetica-Narrow-Oblique", HELVETICA, "regular", "condensed", "oblique", 21}, +{"Helvetica-Oblique", HELVETICA, "regular", 0, "oblique", 17}, {"NewCenturySchlbk-Bold", "Century Schoolbook L", "bold", 0, 0, 26}, {"NewCenturySchlbk-BoldItalic", "Century Schoolbook L", "bold", 0, "italic", 27}, {"NewCenturySchlbk-Italic", "Century Schoolbook L", 0, 0, "italic", 25}, {"NewCenturySchlbk-Roman", "Century Schoolbook L", "roman", 0, 0, 24}, -{"Palatino-Bold", "URW Palladio L", "bold", 0, 0, 30}, -{"Palatino-BoldItalic", "URW Palladio L", "bold", 0, "italic", 31}, -{"Palatino-Italic", "URW Palladio L", 0, 0, "italic", 29}, -{"Palatino-Roman", "URW Palladio L", "roman", 0, 0, 28}, -{"Symbol", "Standard Symbols L", "regular", 0, 0, 32}, -{"Times-Bold", "Nimbus Roman No9 L", "medium", 0, 0, 2 }, -{"Times-BoldItalic", "Nimbus Roman No9 L", "medium", 0, "italic", 3 }, -{"Times-Italic", "Nimbus Roman No9 L", "regular", 0, "italic", 1 }, -{"Times-Roman", "Nimbus Roman No9 L", "regular", 0, 0, 0 }, +{"Palatino-Bold", PALATINO, "bold", 0, 0, 30}, +{"Palatino-BoldItalic", PALATINO, "bold", 0, "italic", 31}, +{"Palatino-Italic", PALATINO, 0, 0, "italic", 29}, +{"Palatino-Roman", PALATINO, "roman", 0, 0, 28}, +{"Symbol", SYMBOL, "regular", 0, 0, 32}, +{"Times-Bold", TIMES, "medium", 0, 0, 2 }, +{"Times-BoldItalic", TIMES, "medium", 0, "italic", 3 }, +{"Times-Italic", TIMES, "regular", 0, "italic", 1 }, +{"Times-Roman", TIMES, "regular", 0, 0, 0 }, {"ZapfChancery-MediumItalic", "URW Chancery L", "medium", 0, "italic", 33}, {"ZapfDingbats", "Dingbats", 0, 0, 0, 34}, diff --git a/lib/common/ps_fontmap.txt b/lib/common/ps_fontmap.txt new file mode 100644 index 000000000..a0e7e30dc --- /dev/null +++ b/lib/common/ps_fontmap.txt @@ -0,0 +1,14 @@ +#ifdef WIN32 +#define TIMES "Times New Roman" +#define COURIER "Courier" +#define HELVETICA "Arial" +#define HELVETICA "Arial" +#define SYMBOL "Symbol" +#define PALATINO "Palatino Linotype" +#else +#define TIMES "Nimbus Roman No9 L" +#define COURIER "Nimbus Mono L" +#define HELVETICA "Nimbus Sans L" +#define SYMBOL "Standard Symbols L" +#define PALATINO "URW Palladio L" +#endif -- 2.40.0