]> granicus.if.org Git - graphviz/commitdiff
Fix ps_font_equiv.h for systems that don't have fontconfig setup to
authorerg <devnull@localhost>
Fri, 8 Jun 2007 22:10:54 +0000 (22:10 +0000)
committererg <devnull@localhost>
Fri, 8 Jun 2007 22:10:54 +0000 (22:10 +0000)
run off of ghostscript. At present, this means allowing Windows to
use the fonts in the windows system font directory.

lib/common/Makefile.am
lib/common/Makefile.old
lib/common/ps_font_equiv.txt
lib/common/ps_fontmap.txt [new file with mode: 0644]

index 3bcb8e891989e8bd901b260b8ac35b2eb1ef5c16..448c086b5f64a9e4ae056e0fd9f185e3f7d804bb 100644 (file)
@@ -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
index 058f2279c317f15a883de9f7b7eb47f6d9f49882..a783d88eaec177f65d3ee87a0b1dec8800be7881 100644 (file)
@@ -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
index 1ecbbbbc5788bc438d12e199900c4c7c733800e0..678a196a0852112d8ebe591be6a6341380eb5a77 100644 (file)
@@ -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 (file)
index 0000000..a0e7e30
--- /dev/null
@@ -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