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:
4
configure
vendored
4
configure
vendored
@@ -25945,6 +25945,10 @@ echo "${ECHO_T}$PANGOXFT_LIBS" >&6
|
|||||||
|
|
||||||
if test $succeeded = yes; then
|
if test $succeeded = yes; then
|
||||||
|
|
||||||
|
cat >>confdefs.h <<\_ACEOF
|
||||||
|
#define HAVE_PANGO_XFT 1
|
||||||
|
_ACEOF
|
||||||
|
|
||||||
CXXFLAGS="$CXXFLAGS $PANGOXFT_CFLAGS"
|
CXXFLAGS="$CXXFLAGS $PANGOXFT_CFLAGS"
|
||||||
GUI_TK_LIBRARY="$GUI_TK_LIBRARY $PANGOXFT_LIBS"
|
GUI_TK_LIBRARY="$GUI_TK_LIBRARY $PANGOXFT_LIBS"
|
||||||
|
|
||||||
|
@@ -2767,6 +2767,7 @@ equivalent variable and GTK+ is version 1.2.3 or above.
|
|||||||
)
|
)
|
||||||
PKG_CHECK_MODULES(PANGOXFT, pangoxft,
|
PKG_CHECK_MODULES(PANGOXFT, pangoxft,
|
||||||
[
|
[
|
||||||
|
AC_DEFINE(HAVE_PANGO_XFT)
|
||||||
CXXFLAGS="$CXXFLAGS $PANGOXFT_CFLAGS"
|
CXXFLAGS="$CXXFLAGS $PANGOXFT_CFLAGS"
|
||||||
GUI_TK_LIBRARY="$GUI_TK_LIBRARY $PANGOXFT_LIBS"
|
GUI_TK_LIBRARY="$GUI_TK_LIBRARY $PANGOXFT_LIBS"
|
||||||
],
|
],
|
||||||
|
@@ -1306,6 +1306,9 @@
|
|||||||
/* Define if you have pango_font_family_is_monospace() (Pango >= 1.3.3) */
|
/* Define if you have pango_font_family_is_monospace() (Pango >= 1.3.3) */
|
||||||
#undef HAVE_PANGO_FONT_FAMILY_IS_MONOSPACE
|
#undef HAVE_PANGO_FONT_FAMILY_IS_MONOSPACE
|
||||||
|
|
||||||
|
/* Define if you have Pango xft support */
|
||||||
|
#undef HAVE_PANGO_XFT
|
||||||
|
|
||||||
/* -------------------------------------------------------------------------
|
/* -------------------------------------------------------------------------
|
||||||
Win32 adjustments section
|
Win32 adjustments section
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
@@ -690,7 +690,9 @@ bool wxApp::OnInitGui()
|
|||||||
|
|
||||||
#include <pango/pango.h>
|
#include <pango/pango.h>
|
||||||
#include <pango/pangox.h>
|
#include <pango/pangox.h>
|
||||||
#include <pango/pangoxft.h>
|
#ifdef HAVE_PANGO_XFT
|
||||||
|
#include <pango/pangoxft.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
PangoContext* wxApp::GetPangoContext()
|
PangoContext* wxApp::GetPangoContext()
|
||||||
{
|
{
|
||||||
@@ -700,7 +702,7 @@ PangoContext* wxApp::GetPangoContext()
|
|||||||
|
|
||||||
Display *xdisplay = (Display*) wxApp::GetDisplay();
|
Display *xdisplay = (Display*) wxApp::GetDisplay();
|
||||||
|
|
||||||
#if 1
|
#ifdef HAVE_PANGO_XFT
|
||||||
int xscreen = DefaultScreen(xdisplay);
|
int xscreen = DefaultScreen(xdisplay);
|
||||||
static int use_xft = -1;
|
static int use_xft = -1;
|
||||||
if (use_xft == -1)
|
if (use_xft == -1)
|
||||||
|
@@ -28,7 +28,9 @@
|
|||||||
#if wxUSE_UNICODE
|
#if wxUSE_UNICODE
|
||||||
#include "glib.h"
|
#include "glib.h"
|
||||||
#include "pango/pangox.h"
|
#include "pango/pangox.h"
|
||||||
#include "pango/pangoxft.h"
|
#ifdef HAVE_PANGO_XFT
|
||||||
|
#include "pango/pangoxft.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "pango_x.cpp"
|
#include "pango_x.cpp"
|
||||||
#endif
|
#endif
|
||||||
|
@@ -64,6 +64,7 @@ x11_draw_glyphs( Drawable drawable,
|
|||||||
PangoGlyphString *glyphs,
|
PangoGlyphString *glyphs,
|
||||||
wxColour &colour )
|
wxColour &colour )
|
||||||
{
|
{
|
||||||
|
#ifdef HAVE_PANGO_XFT
|
||||||
if (PANGO_XFT_IS_FONT (font))
|
if (PANGO_XFT_IS_FONT (font))
|
||||||
{
|
{
|
||||||
Display* xdisplay = wxGlobalDisplay();
|
Display* xdisplay = wxGlobalDisplay();
|
||||||
@@ -84,6 +85,7 @@ x11_draw_glyphs( Drawable drawable,
|
|||||||
XftDrawDestroy( draw );
|
XftDrawDestroy( draw );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
pango_x_render( wxGlobalDisplay(), drawable, gc, font, glyphs, x, y );
|
pango_x_render( wxGlobalDisplay(), drawable, gc, font, glyphs, x, y );
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user