]> git.saurik.com Git - wxWidgets.git/commitdiff
Install AFMs as well.
authorRobert Roebling <robert@roebling.de>
Mon, 7 Jun 1999 11:27:46 +0000 (11:27 +0000)
committerRobert Roebling <robert@roebling.de>
Mon, 7 Jun 1999 11:27:46 +0000 (11:27 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2688 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

Makefile.am
configure.in
include/wx/gtk/Makefile.am
include/wx/gtk1/Makefile.am
include/wx/list.h
misc/Makefile.am [new file with mode: 0644]
misc/afm/Makefile.am [new file with mode: 0644]
misc/gs_afm/Makefile.am [new file with mode: 0644]
src/generic/dcpsg.cpp
wxGTK.spec

index 13d83bc8800e84139aa78f54c0c6ed482e916d27..b8e540ad6e68c3cafae5d31ec14044c6e32d1a20 100644 (file)
@@ -2,7 +2,7 @@
 AUTOMAKE_OPTIONS = 1.4 
 # no-dependencies
 
-SUBDIRS = include src samples # utils user docs
+SUBDIRS = include src samples misc # utils user docs
 
 bin_SCRIPTS = wx-config
 
index 22a7497e6b0fe1cec3740d82ea1357da3d463769..be040f92e39907b26a395ace28fbc100d283b6c1 100644 (file)
@@ -1948,6 +1948,9 @@ AC_OUTPUT([
             include/wx/msw/Makefile
             include/wx/protocol/Makefile
             include/wx/unix/Makefile
+           misc/Makefile
+           misc/afm/Makefile
+           misc/gs_afm/Makefile
             samples/Makefile
             samples/bombs/Makefile
             samples/caret/Makefile
index ded7bc31a52ce5888884c7413b5c17a3a7a0f505..a8b71160e6a1af804a32597dbe02c3966b7d297d 100644 (file)
@@ -63,8 +63,3 @@ wx_gtk_include_HEADERS = \
  win_gtk.h \
  window.h
 
-# setup.h is installed in another directory because several versions of wxwin
-# should be able to coexist on the same machine
-portheadersdir = ${datadir}/@PACKAGE@/include/wx
-portheaders_HEADERS = setup.h
-
index ded7bc31a52ce5888884c7413b5c17a3a7a0f505..a8b71160e6a1af804a32597dbe02c3966b7d297d 100644 (file)
@@ -63,8 +63,3 @@ wx_gtk_include_HEADERS = \
  win_gtk.h \
  window.h
 
-# setup.h is installed in another directory because several versions of wxwin
-# should be able to coexist on the same machine
-portheadersdir = ${datadir}/@PACKAGE@/include/wx
-portheaders_HEADERS = setup.h
-
index cb08945a0a7b1e3456422bce8ac62543c76667e6..01eddf8190c42140e75a4fbb582d68f4c9b78ccb 100644 (file)
@@ -438,7 +438,7 @@ private:
                                     (nodetype *)prev, (nodetype *)next,     \
                                     (T *)data, key);                        \
             }                                                               \
-    };
+    }
 
 #define WX_DECLARE_LIST_2(elementtype, listname, nodename)                  \
     WX_DECLARE_LIST_3(elementtype, elementtype, listname, nodename)
diff --git a/misc/Makefile.am b/misc/Makefile.am
new file mode 100644 (file)
index 0000000..21991e1
--- /dev/null
@@ -0,0 +1,7 @@
+## Purpose: The automake makefile for wxWindows (misc direcotry)
+## Author:  Phil Blecker, Vadim Zeitlin
+## Version: $Id$
+##
+## Process this file with automake to produce Makefile.in
+
+SUBDIRS = afm gs_afm
diff --git a/misc/afm/Makefile.am b/misc/afm/Makefile.am
new file mode 100644 (file)
index 0000000..45f62c4
--- /dev/null
@@ -0,0 +1,21 @@
+## Purpose: The automake makefile for wxWindows (misc/afm direcotry)
+## Author:  Phil Blecker, Vadim Zeitlin
+## Version: $Id$
+##
+## Process this file with automake to produce Makefile.in
+
+afmdir = $(datadir)/wx/afm
+afm_DATA = \
+  Cour.afm \
+  CourBo.afm \
+  CourBoO.afm \
+  CourO.afm \
+  Helv.afm \
+  HelvBo.afm \
+  HelvBoO.afm \
+  HelvO.afm \
+  TimesRo.afm \
+  TimesBo.afm \
+  TimesBoO.afm \
+  TimesO.afm
+
diff --git a/misc/gs_afm/Makefile.am b/misc/gs_afm/Makefile.am
new file mode 100644 (file)
index 0000000..c3a89fc
--- /dev/null
@@ -0,0 +1,21 @@
+## Purpose: The automake makefile for wxWindows (misc/gs_afm direcotry)
+## Author:  Phil Blecker, Vadim Zeitlin
+## Version: $Id$
+##
+## Process this file with automake to produce Makefile.in
+
+gs_afmdir = $(datadir)/wx/gs_afm
+gs_afm_DATA = \
+  Cour.afm \
+  CourBo.afm \
+  CourBoO.afm \
+  CourO.afm \
+  Helv.afm \
+  HelvBo.afm \
+  HelvBoO.afm \
+  HelvO.afm \
+  TimesRo.afm \
+  TimesBo.afm \
+  TimesBoO.afm \
+  TimesO.afm
+
index c6f1a559f43dd234ae63ad91083087ba97368137..f21c2e82a9850a51c6a8543dff060ba0d45cd40e 100644 (file)
@@ -1685,8 +1685,11 @@ void wxPostScriptDC::GetTextExtent( const wxString& string, long *x, long *y,
         /* get the directory of the AFM files */
         char afmName[256];
         afmName[0] = 0;
-        wxString fmPath(m_printData.GetFontMetricPath());
-        if (fmPath != "") strcpy( afmName, (const char*) fmPath );
+       
+       if (!m_printData.GetFontMetricPath().IsEmpty())
+       {
+           strcpy( afmName, m_printData.GetFontMetricPath().mb_str() )
+       }
 
         /* 2. open and process the file
            /  a short explanation of the AFM format:
@@ -1707,7 +1710,26 @@ void wxPostScriptDC::GetTextExtent( const wxString& string, long *x, long *y,
         strcat(afmName,name);
         strcat(afmName,".afm");
         FILE *afmFile = fopen(afmName,"r");
-        if ( afmFile==NULL )
+       
+#ifdef __UNIX__
+       if (afmFile==NULL)
+       {
+           strcpy( afmName, "/usr/local/share/wx/gs_afm/" );
+            strcat(afmName,name);
+            strcat(afmName,".afm");
+            FILE *afmFile = fopen(afmName,"r");
+       }
+       
+       if (afmFile==NULL)
+       {
+           strcpy( afmName, "/usr/share/wx/gs_afm/" );
+            strcat(afmName,name);
+            strcat(afmName,".afm");
+            FILE *afmFile = fopen(afmName,"r");
+       }
+#endif
+       
+        if (afmFile==NULL)
         {
             wxLogDebug( "GetTextExtent: can't open AFM file '%s'\n", afmName );
             wxLogDebug( "               using approximate values\n");
index 5dadc5c990f50d84cc5e5be04c67ad2450b35413..768a961967747c7661155fc645b0f4953a9fc107 100644 (file)
@@ -52,6 +52,8 @@ rm -rf $RPM_BUILD_ROOT
 %{pref}/include/wx/*
 %dir %{pref}/lib/wx
 %{pref}/lib/wx/*
+%dir %{pref}/share/wx
+%{pref}/share/wx/*
 %attr(755, -, -) %{pref}/lib/libwx_gtk2.so
 %attr(755, -, -) %{pref}/lib/libwx_gtk2.so.1
 %attr(755, -, -) %{pref}/lib/libwx_gtk2.so.1.0