#! /bin/sh
-# From configure.in Id: configure.in 47597 2007-07-20 18:27:35Z PC .
+# From configure.in Id: configure.in 47607 2007-07-21 01:42:58Z VZ .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.61 for wxWidgets 2.9.0.
#
--enable-ffile use wxFFile class
--enable-file use wxFile class
--enable-filesystem use virtual file systems classes
+ --enable-fontenum use wxFontEnumerator class
--enable-fontmap use font encodings conversion classes
--enable-fs_archive use virtual archive filesystems
--enable-fs_inet use virtual HTTP/FTP filesystems
echo "${ECHO_T}$result" >&6; }
+ enablestring=
+ defaultval=$wxUSE_ALL_FEATURES
+ if test -z "$defaultval"; then
+ if test x"$enablestring" = xdisable; then
+ defaultval=yes
+ else
+ defaultval=no
+ fi
+ fi
+
+ { echo "$as_me:$LINENO: checking for --${enablestring:-enable}-fontenum" >&5
+echo $ECHO_N "checking for --${enablestring:-enable}-fontenum... $ECHO_C" >&6; }
+ no_cache=0
+ # Check whether --enable-fontenum was given.
+if test "${enable_fontenum+set}" = set; then
+ enableval=$enable_fontenum;
+ if test "$enableval" = yes; then
+ wx_cv_use_fontenum='wxUSE_FONTENUM=yes'
+ else
+ wx_cv_use_fontenum='wxUSE_FONTENUM=no'
+ fi
+
+else
+
+ LINE=`grep "^wxUSE_FONTENUM=" ${wx_arg_cache_file}`
+ if test "x$LINE" != x ; then
+ eval "DEFAULT_$LINE"
+ else
+ no_cache=1
+ fi
+
+ wx_cv_use_fontenum='wxUSE_FONTENUM=${'DEFAULT_wxUSE_FONTENUM":-$defaultval}"
+
+fi
+
+
+ eval "$wx_cv_use_fontenum"
+ if test "$no_cache" != 1; then
+ echo $wx_cv_use_fontenum >> ${wx_arg_cache_file}.tmp
+ fi
+
+ if test x"$enablestring" = xdisable; then
+ if test $wxUSE_FONTENUM = yes; then
+ result=no
+ else
+ result=yes
+ fi
+ else
+ result=$wxUSE_FONTENUM
+ fi
+
+ { echo "$as_me:$LINENO: result: $result" >&5
+echo "${ECHO_T}$result" >&6; }
+
+
enablestring=
defaultval=$wxUSE_ALL_FEATURES
if test -z "$defaultval"; then
WX_ARG_FEATURE(ffile, [ --enable-ffile use wxFFile class], wxUSE_FFILE)
WX_ARG_FEATURE(file, [ --enable-file use wxFile class], wxUSE_FILE)
WX_ARG_FEATURE(filesystem, [ --enable-filesystem use virtual file systems classes], wxUSE_FILESYSTEM)
+WX_ARG_FEATURE(fontenum, [ --enable-fontenum use wxFontEnumerator class], wxUSE_FONTENUM)
WX_ARG_FEATURE(fontmap, [ --enable-fontmap use font encodings conversion classes], wxUSE_FONTMAP)
WX_ARG_FEATURE(fs_archive, [ --enable-fs_archive use virtual archive filesystems], wxUSE_FS_ARCHIVE)
WX_ARG_FEATURE(fs_inet, [ --enable-fs_inet use virtual HTTP/FTP filesystems], wxUSE_FS_INET)
#ifndef _WX_FONTENUM_H_
#define _WX_FONTENUM_H_
+#include "wx/defs.h"
+
+#if wxUSE_FONTENUM
+
#include "wx/fontenc.h"
#include "wx/arrstr.h"
DECLARE_NO_COPY_CLASS(wxFontEnumerator)
};
+#endif // wxUSE_FONTENUM
+
#endif // _WX_FONTENUM_H_
// Joystick support class
#define wxUSE_JOYSTICK 1
+// wxFontEnumerator class
+#define wxUSE_FONTENUM 1
+
// wxFontMapper class
#define wxUSE_FONTMAP 1
// Joystick support class
#define wxUSE_JOYSTICK 1
+// wxFontEnumerator class
+#define wxUSE_FONTENUM 1
+
// wxFontMapper class
#define wxUSE_FONTMAP 1
// Joystick support class
#define wxUSE_JOYSTICK 1
+// wxFontEnumerator class
+#define wxUSE_FONTENUM 1
+
// wxFontMapper class
#define wxUSE_FONTMAP 1
// Joystick support class
#define wxUSE_JOYSTICK 1
+// wxFontEnumerator class
+#define wxUSE_FONTENUM 1
+
// wxFontMapper class
#define wxUSE_FONTMAP 1
// Joystick support class
#define wxUSE_JOYSTICK 1
+// wxFontEnumerator class
+#define wxUSE_FONTENUM 1
+
// wxFontMapper class
#define wxUSE_FONTMAP 1
// Joystick support class
#define wxUSE_JOYSTICK 1
+// wxFontEnumerator class
+#define wxUSE_FONTENUM 1
+
// wxFontMapper class
#define wxUSE_FONTMAP 1
// Joystick support class
#define wxUSE_JOYSTICK 1
+// wxFontEnumerator class
+#define wxUSE_FONTENUM 1
+
// wxFontMapper class
#define wxUSE_FONTMAP 1
#define wxUSE_JOYSTICK 0
+#define wxUSE_FONTENUM 0
+
#define wxUSE_FONTMAP 0
#define wxUSE_MIMETYPE 0
}
}
-bool wxFontBase::SetFaceName(const wxString &facename)
+bool wxFontBase::SetFaceName(const wxString& facename)
{
+#if wxUSE_FONTENUM
if (!wxFontEnumerator::IsValidFacename(facename))
{
UnRef(); // make Ok() return false
return false;
}
+#else // !wxUSE_FONTENUM
+ wxUnusedVar(facename);
+#endif // wxUSE_FONTENUM/!wxUSE_FONTENUM
return true;
}
// ----------------------------------------------------------------------------
// Up to now, there are no native implementations of this function:
-void wxNativeFontInfo::SetFaceName(const wxArrayString &facenames)
+void wxNativeFontInfo::SetFaceName(const wxArrayString& facenames)
{
+#if wxUSE_FONTENUM
for (size_t i=0; i < facenames.GetCount(); i++)
{
if (wxFontEnumerator::IsValidFacename(facenames[i]))
wxString validfacename = wxFontEnumerator::GetFacenames().Item(0);
wxLogTrace(wxT("font"), wxT("Falling back to '%s'"), validfacename.c_str());
SetFaceName(validfacename);
+#else // !wxUSE_FONTENUM
+ SetFaceName(facenames[0]);
+#endif // wxUSE_FONTENUM/!wxUSE_FONTENUM
}
// NB: the check on the facename is implemented in wxFontBase::SetFaceName
// and not in wxNativeFontInfo::SetFaceName thus we need to explicitely
// call here wxFontEnumerator::IsValidFacename
- if (!wxFontEnumerator::IsValidFacename(face) ||
- !SetFaceName(face))
+ if (
+#if wxUSE_FONTENUM
+ !wxFontEnumerator::IsValidFacename(face) ||
+#endif // wxUSE_FONTENUM
+ !SetFaceName(face) )
+ {
SetFaceName(wxNORMAL_FONT->GetFaceName());
+ }
+
face.clear();
}
}
// NB: the check on the facename is implemented in wxFontBase::SetFaceName
// and not in wxNativeFontInfo::SetFaceName thus we need to explicitely
// call here wxFontEnumerator::IsValidFacename
- if (!wxFontEnumerator::IsValidFacename(face) ||
- !SetFaceName(face))
- SetFaceName(wxNORMAL_FONT->GetFaceName());
+ if (
+#if wxUSE_FONTENUM
+ !wxFontEnumerator::IsValidFacename(face) ||
+#endif // wxUSE_FONTENUM
+ !SetFaceName(face) )
+ {
+ SetFaceName(wxNORMAL_FONT->GetFaceName());
+ }
}
// set point size to default value if size was not given
#pragma hdrstop
#endif
+#if wxUSE_FONTENUM
+
#include "wx/fontenum.h"
// ============================================================================
return true;
}
#endif // wxHAS_UTF8_FONTS
+
+#endif // wxUSE_FONTENUM
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
-#if wxUSE_FONTMAP
+#if wxUSE_FONTENUM
#include "wx/fontenum.h"
//
// From Apple's QA 1471 http://developer.apple.com/qa/qa2006/qa1471.html
//
-
+
ATSFontFamilyIterator theFontFamilyIterator = NULL;
ATSFontFamilyRef theATSFontFamilyRef = 0;
OSStatus status = noErr;
-
+
wxArrayString fontFamilies ;
-
+
// Create the iterator
status = ATSFontFamilyIteratorCreate(kATSFontContextLocal, nil,nil,
kATSOptionFlagsUnRestrictedScope,
&theFontFamilyIterator );
-
+
wxUint32 macEncoding = wxMacGetSystemEncFromFontEnc(encoding) ;
-
+
while (status == noErr)
{
// Get the next font in the iteration.
if ( fontFamiliyEncoding != macEncoding )
continue ;
}
-
+
// TODO: determine fixed widths ...
CFStringRef theName = NULL;
}
}
ATSFontFamilyIteratorRelease(&theFontFamilyIterator);
-
+
for ( size_t i = 0 ; i < fontFamilies.Count() ; ++i )
{
if ( OnFacename( fontFamilies[i] ) == false )
break ;
}
-
+
return true;
}
return true;
}
-#endif // wxUSE_FONTMAP
+#endif // wxUSE_FONTENUM
#pragma hdrstop
#endif
-#if wxUSE_FONTMAP
+#if wxUSE_FONTENUM
#ifndef WX_PRECOMP
#include "wx/gdicmn.h"
}
#endif
-#endif // wxUSE_FONTMAP
+#endif // wxUSE_FONTENUM
// for compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
+#if wxUSE_FONTENUM
+
#include "wx/fontenum.h"
#ifndef WX_PRECOMP
}
#endif // !wxUSE_PANGO
+
+#endif // wxUSE_FONTENUM