Install AFMs as well.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2688 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
1999-06-07 11:27:46 +00:00
parent 25dbfc255b
commit 385bcb3545
10 changed files with 81 additions and 15 deletions

View 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

View 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

View 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

View 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

View 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)

7
misc/Makefile.am Normal file
View File

@@ -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

21
misc/afm/Makefile.am Normal file
View File

@@ -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

21
misc/gs_afm/Makefile.am Normal file
View File

@@ -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

View 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");

View 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