Check for Pango XFT presence (for wxX11).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30907 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Mattia Barbon 2004-12-08 22:13:37 +00:00
parent 78b3b018ce
commit 4ae1af0588
6 changed files with 17 additions and 3 deletions

4
configure vendored
View File

@ -25945,6 +25945,10 @@ echo "${ECHO_T}$PANGOXFT_LIBS" >&6
if test $succeeded = yes; then
cat >>confdefs.h <<\_ACEOF
#define HAVE_PANGO_XFT 1
_ACEOF
CXXFLAGS="$CXXFLAGS $PANGOXFT_CFLAGS"
GUI_TK_LIBRARY="$GUI_TK_LIBRARY $PANGOXFT_LIBS"

View File

@ -2767,6 +2767,7 @@ equivalent variable and GTK+ is version 1.2.3 or above.
)
PKG_CHECK_MODULES(PANGOXFT, pangoxft,
[
AC_DEFINE(HAVE_PANGO_XFT)
CXXFLAGS="$CXXFLAGS $PANGOXFT_CFLAGS"
GUI_TK_LIBRARY="$GUI_TK_LIBRARY $PANGOXFT_LIBS"
],

View File

@ -1306,6 +1306,9 @@
/* Define if you have pango_font_family_is_monospace() (Pango >= 1.3.3) */
#undef HAVE_PANGO_FONT_FAMILY_IS_MONOSPACE
/* Define if you have Pango xft support */
#undef HAVE_PANGO_XFT
/* -------------------------------------------------------------------------
Win32 adjustments section
------------------------------------------------------------------------- */

View File

@ -690,7 +690,9 @@ bool wxApp::OnInitGui()
#include <pango/pango.h>
#include <pango/pangox.h>
#include <pango/pangoxft.h>
#ifdef HAVE_PANGO_XFT
#include <pango/pangoxft.h>
#endif
PangoContext* wxApp::GetPangoContext()
{
@ -700,7 +702,7 @@ PangoContext* wxApp::GetPangoContext()
Display *xdisplay = (Display*) wxApp::GetDisplay();
#if 1
#ifdef HAVE_PANGO_XFT
int xscreen = DefaultScreen(xdisplay);
static int use_xft = -1;
if (use_xft == -1)

View File

@ -28,7 +28,9 @@
#if wxUSE_UNICODE
#include "glib.h"
#include "pango/pangox.h"
#include "pango/pangoxft.h"
#ifdef HAVE_PANGO_XFT
#include "pango/pangoxft.h"
#endif
#include "pango_x.cpp"
#endif

View File

@ -64,6 +64,7 @@ x11_draw_glyphs( Drawable drawable,
PangoGlyphString *glyphs,
wxColour &colour )
{
#ifdef HAVE_PANGO_XFT
if (PANGO_XFT_IS_FONT (font))
{
Display* xdisplay = wxGlobalDisplay();
@ -84,6 +85,7 @@ x11_draw_glyphs( Drawable drawable,
XftDrawDestroy( draw );
}
else
#endif
{
pango_x_render( wxGlobalDisplay(), drawable, gc, font, glyphs, x, y );
}