diff --git a/configure.ac b/configure.ac
index f74aca4..76faf9b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -268,9 +268,6 @@ PKG_CHECK_MODULES([GDK], [gdk-2.0 >= 2.4], ,
 PKG_CHECK_MODULES([GTK], [gtk+-2.0 >= 2.4], ,
                   [AS_IF([test -z "${GTK_LIBS+x}"],
                          [AC_MSG_FAILURE([GTK+ 2.4 or newer is required.])])])
-PKG_CHECK_MODULES([PANGOX], [pangox], ,
-                  [AS_IF([test -z "${PANGOX_LIBS+x}"],
-                         [AC_MSG_FAILURE([Pango X font support is required.])])])
 PKG_CHECK_MODULES([PANGOFT2], [pangoft2], ,
                   [AS_IF([test -z "${PANGOFT2_LIBS+x}"],
                          [AC_MSG_WARN([Pango Freetype support is required to build some of the examples.])])])
diff --git a/examples/Makefile.am b/examples/Makefile.am
index 28debb4..ade1523 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -43,7 +43,6 @@ common_programs = \
 	pixmap-mixed		\
 	share-lists		\
 	color			\
-	font			\
 	button			\
 	shapes			\
 	logo			\
@@ -85,8 +84,6 @@ share_lists_SOURCES = share-lists.c
 
 color_SOURCES = color.c
 
-font_SOURCES = font.c
-
 button_SOURCES = button.c
 
 shapes_SOURCES = trackball.h trackball.c shapes.c
diff --git a/examples/font.c b/examples/font.c
deleted file mode 100644
index 964dd98..0000000
--- a/examples/font.c
+++ /dev/null
@@ -1,349 +0,0 @@
-/*
- * font.c:
- * Simple bitmap font rendering example.
- *
- * written by Naofumi Yasufuku  <naofumi@users.sourceforge.net>
- */
-
-#include <stdlib.h>
-#include <string.h>
-
-#include <gtk/gtk.h>
-
-#include <gtk/gtkgl.h>
-
-#ifdef G_OS_WIN32
-#define WIN32_LEAN_AND_MEAN 1
-#include <windows.h>
-#endif
-
-#include <GL/gl.h>
-#include <GL/glu.h>
-
-static gchar font_string[] = "courier 12";
-static GLuint font_list_base;
-static gint font_height;
-
-static void
-realize (GtkWidget *widget,
-         gpointer   data)
-{
-  GdkGLContext *glcontext = gtk_widget_get_gl_context (widget);
-  GdkGLDrawable *gldrawable = gtk_widget_get_gl_drawable (widget);
-
-  PangoFontDescription *font_desc;
-  PangoFont *font;
-  PangoFontMetrics *font_metrics;
-
-  /*** OpenGL BEGIN ***/
-  if (!gdk_gl_drawable_gl_begin (gldrawable, glcontext))
-    return;
-
-  /*
-   * Generate font display lists.
-   */
-  font_list_base = glGenLists (128);
-
-  font_desc = pango_font_description_from_string (font_string);
-
-  font = gdk_gl_font_use_pango_font (font_desc, 0, 128, font_list_base);
-  if (font == NULL)
-    {
-      g_print ("*** Can't load font '%s'\n", font_string);
-      exit (1);
-    }
-
-  font_metrics = pango_font_get_metrics (font, NULL);
-
-  font_height = pango_font_metrics_get_ascent (font_metrics) +
-                pango_font_metrics_get_descent (font_metrics);
-  font_height = PANGO_PIXELS (font_height);
-
-  pango_font_description_free (font_desc);
-  pango_font_metrics_unref (font_metrics);
-
-  glClearColor (1.0, 1.0, 1.0, 1.0);
-  glClearDepth (1.0);
-
-  glViewport (0, 0,
-              widget->allocation.width, widget->allocation.height);
-
-  glMatrixMode (GL_PROJECTION);
-  glLoadIdentity ();
-  glOrtho (0.0, widget->allocation.width,
-           0.0, widget->allocation.height,
-           -1.0, 1.0);
-
-  glMatrixMode (GL_MODELVIEW);
-  glLoadIdentity ();
-
-  gdk_gl_drawable_gl_end (gldrawable);
-  /*** OpenGL END ***/
-}
-
-static gboolean
-configure_event (GtkWidget         *widget,
-                 GdkEventConfigure *event,
-                 gpointer           data)
-{
-  GdkGLContext *glcontext = gtk_widget_get_gl_context (widget);
-  GdkGLDrawable *gldrawable = gtk_widget_get_gl_drawable (widget);
-
-  /*** OpenGL BEGIN ***/
-  if (!gdk_gl_drawable_gl_begin (gldrawable, glcontext))
-    return FALSE;
-
-  glViewport (0, 0,
-              widget->allocation.width, widget->allocation.height);
-
-  glMatrixMode (GL_PROJECTION);
-  glLoadIdentity ();
-  glOrtho (0.0, widget->allocation.width,
-           0.0, widget->allocation.height,
-           -1.0, 1.0);
-
-  glMatrixMode (GL_MODELVIEW);
-  glLoadIdentity ();
-
-  gdk_gl_drawable_gl_end (gldrawable);
-  /*** OpenGL END ***/
-
-  return TRUE;
-}
-
-static gboolean
-expose_event (GtkWidget      *widget,
-              GdkEventExpose *event,
-              gpointer        data)
-{
-  GdkGLContext *glcontext = gtk_widget_get_gl_context (widget);
-  GdkGLDrawable *gldrawable = gtk_widget_get_gl_drawable (widget);
-  int i, j;
-
-  /*** OpenGL BEGIN ***/
-  if (!gdk_gl_drawable_gl_begin (gldrawable, glcontext))
-    return FALSE;
-
-  glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
-
-  /*
-   * Draw some text.
-   */
-  glColor3f (0.0, 0.0, 0.0);
-  for (i = 2; i >= -2; i--)
-    {
-      glRasterPos2f (10.0, 0.5*widget->allocation.height + i*font_height);
-      for (j = ' '; j <= 'Z'; j++)
-        glCallList (font_list_base+j);
-    }
-
-  /*
-   * Show font description string.
-   */
-  glColor3f (1.0, 0.0, 0.0);
-  glRasterPos2f (10.0, 10.0);
-  glListBase (font_list_base);
-  glCallLists (strlen (font_string), GL_UNSIGNED_BYTE, font_string);
-
-  if (gdk_gl_drawable_is_double_buffered (gldrawable))
-    gdk_gl_drawable_swap_buffers (gldrawable);
-  else
-    glFlush ();
-
-  gdk_gl_drawable_gl_end (gldrawable);
-  /*** OpenGL END ***/
-
-  return TRUE;
-}
-
-static void
-print_gl_config_attrib (GdkGLConfig *glconfig,
-                        const gchar *attrib_str,
-                        int          attrib,
-                        gboolean     is_boolean)
-{
-  int value;
-
-  g_print ("%s = ", attrib_str);
-  if (gdk_gl_config_get_attrib (glconfig, attrib, &value))
-    {
-      if (is_boolean)
-        g_print ("%s\n", value == TRUE ? "TRUE" : "FALSE");
-      else
-        g_print ("%d\n", value);
-    }
-  else
-    g_print ("*** Cannot get %s attribute value\n", attrib_str);
-}
-
-static void
-examine_gl_config_attrib (GdkGLConfig *glconfig)
-{
-  g_print ("\nOpenGL visual configurations :\n\n");
-
-  g_print ("gdk_gl_config_is_rgba (glconfig) = %s\n",
-           gdk_gl_config_is_rgba (glconfig) ? "TRUE" : "FALSE");
-  g_print ("gdk_gl_config_is_double_buffered (glconfig) = %s\n",
-           gdk_gl_config_is_double_buffered (glconfig) ? "TRUE" : "FALSE");
-  g_print ("gdk_gl_config_is_stereo (glconfig) = %s\n",
-           gdk_gl_config_is_stereo (glconfig) ? "TRUE" : "FALSE");
-  g_print ("gdk_gl_config_has_alpha (glconfig) = %s\n",
-           gdk_gl_config_has_alpha (glconfig) ? "TRUE" : "FALSE");
-  g_print ("gdk_gl_config_has_depth_buffer (glconfig) = %s\n",
-           gdk_gl_config_has_depth_buffer (glconfig) ? "TRUE" : "FALSE");
-  g_print ("gdk_gl_config_has_stencil_buffer (glconfig) = %s\n",
-           gdk_gl_config_has_stencil_buffer (glconfig) ? "TRUE" : "FALSE");
-  g_print ("gdk_gl_config_has_accum_buffer (glconfig) = %s\n",
-           gdk_gl_config_has_accum_buffer (glconfig) ? "TRUE" : "FALSE");
-
-  g_print ("\n");
-
-  print_gl_config_attrib (glconfig, "GDK_GL_USE_GL",           GDK_GL_USE_GL,           TRUE);
-  print_gl_config_attrib (glconfig, "GDK_GL_BUFFER_SIZE",      GDK_GL_BUFFER_SIZE,      FALSE);
-  print_gl_config_attrib (glconfig, "GDK_GL_LEVEL",            GDK_GL_LEVEL,            FALSE);
-  print_gl_config_attrib (glconfig, "GDK_GL_RGBA",             GDK_GL_RGBA,             TRUE);
-  print_gl_config_attrib (glconfig, "GDK_GL_DOUBLEBUFFER",     GDK_GL_DOUBLEBUFFER,     TRUE);
-  print_gl_config_attrib (glconfig, "GDK_GL_STEREO",           GDK_GL_STEREO,           TRUE);
-  print_gl_config_attrib (glconfig, "GDK_GL_AUX_BUFFERS",      GDK_GL_AUX_BUFFERS,      FALSE);
-  print_gl_config_attrib (glconfig, "GDK_GL_RED_SIZE",         GDK_GL_RED_SIZE,         FALSE);
-  print_gl_config_attrib (glconfig, "GDK_GL_GREEN_SIZE",       GDK_GL_GREEN_SIZE,       FALSE);
-  print_gl_config_attrib (glconfig, "GDK_GL_BLUE_SIZE",        GDK_GL_BLUE_SIZE,        FALSE);
-  print_gl_config_attrib (glconfig, "GDK_GL_ALPHA_SIZE",       GDK_GL_ALPHA_SIZE,       FALSE);
-  print_gl_config_attrib (glconfig, "GDK_GL_DEPTH_SIZE",       GDK_GL_DEPTH_SIZE,       FALSE);
-  print_gl_config_attrib (glconfig, "GDK_GL_STENCIL_SIZE",     GDK_GL_STENCIL_SIZE,     FALSE);
-  print_gl_config_attrib (glconfig, "GDK_GL_ACCUM_RED_SIZE",   GDK_GL_ACCUM_RED_SIZE,   FALSE);
-  print_gl_config_attrib (glconfig, "GDK_GL_ACCUM_GREEN_SIZE", GDK_GL_ACCUM_GREEN_SIZE, FALSE);
-  print_gl_config_attrib (glconfig, "GDK_GL_ACCUM_BLUE_SIZE",  GDK_GL_ACCUM_BLUE_SIZE,  FALSE);
-  print_gl_config_attrib (glconfig, "GDK_GL_ACCUM_ALPHA_SIZE", GDK_GL_ACCUM_ALPHA_SIZE, FALSE);
-
-  g_print ("\n");
-}
-
-int
-main (int   argc,
-      char *argv[])
-{
-  GdkGLConfig *glconfig;
-  gint major, minor;
-
-  GtkWidget *window;
-  GtkWidget *vbox;
-  GtkWidget *drawing_area;
-  GtkWidget *button;
-
-  /*
-   * Init GTK.
-   */
-
-  gtk_init (&argc, &argv);
-
-  /*
-   * Init GtkGLExt.
-   */
-
-  gtk_gl_init (&argc, &argv);
-
-  /*
-   * Query OpenGL extension version.
-   */
-
-  gdk_gl_query_version (&major, &minor);
-  g_print ("\nOpenGL extension version - %d.%d\n",
-           major, minor);
-
-  /*
-   * Configure OpenGL-capable visual.
-   */
-
-  /* Try double-buffered visual */
-  glconfig = gdk_gl_config_new_by_mode (GDK_GL_MODE_RGB    |
-                                        GDK_GL_MODE_DOUBLE);
-  if (glconfig == NULL)
-    {
-      g_print ("*** Cannot find the double-buffered visual.\n");
-      g_print ("*** Trying single-buffered visual.\n");
-
-      /* Try single-buffered visual */
-      glconfig = gdk_gl_config_new_by_mode (GDK_GL_MODE_RGB);
-      if (glconfig == NULL)
-        {
-          g_print ("*** No appropriate OpenGL-capable visual found.\n");
-          exit (1);
-        }
-    }
-
-  examine_gl_config_attrib (glconfig);
-
-  /*
-   * Top-level window.
-   */
-
-  window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
-  gtk_window_set_title (GTK_WINDOW (window), "font");
-
-  /* Get automatically redrawn if any of their children changed allocation. */
-  gtk_container_set_reallocate_redraws (GTK_CONTAINER (window), TRUE);
-
-  g_signal_connect (G_OBJECT (window), "delete_event",
-                    G_CALLBACK (gtk_main_quit), NULL);
-
-  /*
-   * VBox.
-   */
-
-  vbox = gtk_vbox_new (FALSE, 0);
-  gtk_container_add (GTK_CONTAINER (window), vbox);
-  gtk_widget_show (vbox);
-
-  /*
-   * Drawing area for drawing OpenGL scene.
-   */
-
-  drawing_area = gtk_drawing_area_new ();
-  gtk_widget_set_size_request (drawing_area, 640, 240);
-
-  /* Set OpenGL-capability to the widget. */
-  gtk_widget_set_gl_capability (drawing_area,
-				glconfig,
-                                NULL,
-                                TRUE,
-                                GDK_GL_RGBA_TYPE);
-
-  g_signal_connect_after (G_OBJECT (drawing_area), "realize",
-                          G_CALLBACK (realize), NULL);
-  g_signal_connect (G_OBJECT (drawing_area), "configure_event",
-		    G_CALLBACK (configure_event), NULL);
-  g_signal_connect (G_OBJECT (drawing_area), "expose_event",
-		    G_CALLBACK (expose_event), NULL);
-
-  gtk_box_pack_start (GTK_BOX (vbox), drawing_area, TRUE, TRUE, 0);
-
-  gtk_widget_show (drawing_area);
-
-  /*
-   * Simple quit button.
-   */
-
-  button = gtk_button_new_with_label ("Quit");
-
-  g_signal_connect (G_OBJECT (button), "clicked",
-                    G_CALLBACK (gtk_main_quit), NULL);
-
-  gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
-
-  gtk_widget_show (button);
-
-  /*
-   * Show window.
-   */
-
-  gtk_widget_show (window);
-
-  /*
-   * Main loop.
-   */
-
-  gtk_main ();
-
-  return 0;
-}
diff --git a/gdk/Makefile.am b/gdk/Makefile.am
index 8721588..9efaaf6 100644
--- a/gdk/Makefile.am
+++ b/gdk/Makefile.am
@@ -79,7 +79,6 @@ gdkglext_public_h_sources = \
 	gdkgldrawable.h		\
 	gdkglpixmap.h		\
 	gdkglwindow.h		\
-	gdkglfont.h		\
 	gdkglshapes.h		\
 	gdkglglext.h
 
diff --git a/gdk/gdkgl.h b/gdk/gdkgl.h
index f22a31c..fc80db3 100644
--- a/gdk/gdkgl.h
+++ b/gdk/gdkgl.h
@@ -33,7 +33,6 @@
 #include <gdk/gdkgldrawable.h>
 #include <gdk/gdkglpixmap.h>
 #include <gdk/gdkglwindow.h>
-#include <gdk/gdkglfont.h>
 #include <gdk/gdkglshapes.h>
 
 #endif /* __GDK_GL_H__ */
diff --git a/gdk/gdkglfont.h b/gdk/gdkglfont.h
deleted file mode 100644
index 6aaca13..0000000
--- a/gdk/gdkglfont.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/* GdkGLExt - OpenGL Extension to GDK
- * Copyright (C) 2002-2004  Naofumi Yasufuku
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA.
- */
-
-#ifndef __GDK_GL_FONT_H__
-#define __GDK_GL_FONT_H__
-
-#include <gdk/gdkgldefs.h>
-#include <gdk/gdkgltypes.h>
-
-G_BEGIN_DECLS
-
-#ifndef GDK_MULTIHEAD_SAFE
-PangoFont *gdk_gl_font_use_pango_font             (const PangoFontDescription *font_desc,
-                                                   int                         first,
-                                                   int                         count,
-                                                   int                         list_base);
-#endif /* GDK_MULTIHEAD_SAFE */
-
-#ifdef GDKGLEXT_MULTIHEAD_SUPPORT
-PangoFont *gdk_gl_font_use_pango_font_for_display (GdkDisplay                 *display,
-                                                   const PangoFontDescription *font_desc,
-                                                   int                         first,
-                                                   int                         count,
-                                                   int                         list_base);
-#endif /* GDKGLEXT_MULTIHEAD_SUPPORT */
-
-G_END_DECLS
-
-#endif /* __GDK_GL_FONT_H__ */
diff --git a/gdk/win32/Makefile.am b/gdk/win32/Makefile.am
index 5e2532e..9a4edb8 100644
--- a/gdk/win32/Makefile.am
+++ b/gdk/win32/Makefile.am
@@ -34,7 +34,6 @@ gdkglext_win32_c_sources = \
 	gdkgldrawable-win32.c	\
 	gdkglpixmap-win32.c	\
 	gdkglwindow-win32.c	\
-	gdkglfont-win32.c	\
 	gdkglwglext.c
 
 gdkglext_win32_headers = \
diff --git a/gdk/win32/gdkglfont-win32.c b/gdk/win32/gdkglfont-win32.c
deleted file mode 100644
index 880715b..0000000
--- a/gdk/win32/gdkglfont-win32.c
+++ /dev/null
@@ -1,109 +0,0 @@
-/* GdkGLExt - OpenGL Extension to GDK
- * Copyright (C) 2002-2004  Naofumi Yasufuku
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA.
- */
-
-#include <pango/pangowin32.h>
-
-#include "gdkglwin32.h"
-#include "gdkglprivate-win32.h"
-#include "gdkglfont.h"
-
-#ifdef GDKGLEXT_MULTIHEAD_SUPPORT
-#include <gdk/gdkdisplay.h>
-#endif /* GDKGLEXT_MULTIHEAD_SUPPORT */
-
-PangoFont *
-gdk_gl_font_use_pango_font (const PangoFontDescription *font_desc,
-                            int                         first,
-                            int                         count,
-                            int                         list_base)
-{
-  PangoFontMap *font_map;
-  PangoFont *font = NULL;
-  LOGFONT *logfont = NULL;
-  PangoWin32FontCache *font_cache;
-  HFONT hfont;
-  HDC hdc;
-
-  g_return_val_if_fail (font_desc != NULL, NULL);
-
-  GDK_GL_NOTE_FUNC ();
-
-  font_map = pango_win32_font_map_for_display ();
-
-  font = pango_font_map_load_font (font_map, NULL, font_desc);
-  if (font == NULL)
-    {
-      g_warning ("cannot load PangoFont");
-      goto FAIL;
-    }
-
-  logfont = pango_win32_font_logfont (font);
-  if (logfont == NULL)
-    {
-      g_warning ("cannot get LOGFONT struct");
-      font = NULL;
-      goto FAIL;
-    }
-
-  font_cache = pango_win32_font_map_get_font_cache (font_map);
-
-  hfont = pango_win32_font_cache_load (font_cache, logfont);
-
-  hdc = CreateCompatibleDC (NULL);
-  if (hdc == NULL)
-    {
-      g_warning ("cannot create a memory DC");
-      font = NULL;
-      goto FAIL;
-    }
-
-  SelectObject (hdc, hfont);
-
-  if (!wglUseFontBitmaps (hdc, first, count, list_base))
-    {
-      g_warning ("cannot create the font display lists");
-      font = NULL;
-      goto FAIL;
-    }
-
-  if (!DeleteDC (hdc))
-    g_warning ("cannot delete the memory DC");
-
-  pango_win32_font_cache_unload (font_cache, hfont);
-
- FAIL:
-
-  if (logfont != NULL)
-    g_free (logfont);
-
-  return font;
-}
-
-#ifdef GDKGLEXT_MULTIHEAD_SUPPORT
-
-PangoFont *
-gdk_gl_font_use_pango_font_for_display (GdkDisplay                 *display,
-                                        const PangoFontDescription *font_desc,
-                                        int                         first,
-                                        int                         count,
-                                        int                         list_base)
-{
-  return gdk_gl_font_use_pango_font (font_desc, first, count, list_base);
-}
-
-#endif /* GDKGLEXT_MULTIHEAD_SUPPORT */
diff --git a/gdk/x11/Makefile.am b/gdk/x11/Makefile.am
index d311713..15bb7e1 100644
--- a/gdk/x11/Makefile.am
+++ b/gdk/x11/Makefile.am
@@ -12,7 +12,6 @@ AM_CPPFLAGS = \
 	$(GDK_CFLAGS)			\
 	$(GL_CFLAGS)			\
 	$(GDKGLEXT_WIN_CFLAGS)		\
-	$(PANGOX_CFLAGS)		\
 	-DG_DISABLE_DEPRECATED		\
 	-DGDK_DISABLE_DEPRECATED	\
 	-DGDK_PIXBUF_DISABLE_DEPRECATED
@@ -37,7 +36,6 @@ gdkglext_x11_c_sources = \
 	gdkgldrawable-x11.c	\
 	gdkglpixmap-x11.c	\
 	gdkglwindow-x11.c	\
-	gdkglfont-x11.c		\
 	gdkglglxext.c
 
 gdkglext_x11_headers = \
@@ -53,5 +51,5 @@ gdkglextx11include_HEADERS = $(gdkglext_x11_headers)
 noinst_LTLIBRARIES = libgdkglext-x11.la
 
 libgdkglext_x11_la_SOURCES = $(gdkglext_x11_sources)
-libgdkglext_x11_la_LDFLAGS = $(GDK_LIBS) $(GL_LIBS) $(GDKGLEXT_WIN_LIBS) $(PANGOX_LIBS)
+libgdkglext_x11_la_LDFLAGS = $(GDK_LIBS) $(GL_LIBS) $(GDKGLEXT_WIN_LIBS)
 
diff --git a/gdk/x11/gdkglfont-x11.c b/gdk/x11/gdkglfont-x11.c
deleted file mode 100644
index 961c567..0000000
--- a/gdk/x11/gdkglfont-x11.c
+++ /dev/null
@@ -1,208 +0,0 @@
-/* GdkGLExt - OpenGL Extension to GDK
- * Copyright (C) 2002-2004  Naofumi Yasufuku
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA.
- */
-
-#include <string.h>
-
-#include <pango/pangox.h>
-
-#include "gdkglx.h"
-#include "gdkglprivate-x11.h"
-#include "gdkglfont.h"
-
-#ifdef GDKGLEXT_MULTIHEAD_SUPPORT
-#include <gdk/gdk.h>
-#endif /* GDKGLEXT_MULTIHEAD_SUPPORT */
-
-/*
- * This code is ripped from gdk/x11/gdkfont-x11.c in GTK+.
- */
-static char *
-gdk_gl_font_charset_for_locale (void)
-{
-  static const char *charset_map[][2] = {
-    { "ANSI_X3.4-1968", "iso8859-1" },
-    { "US-ASCII",   "iso8859-1" },
-    { "ISO-8859-1", "iso8859-1" },
-    { "ISO-8859-2", "iso8859-2" },
-    { "ISO-8859-3", "iso8859-3" },
-    { "ISO-8859-4", "iso8859-4" },
-    { "ISO-8859-5", "iso8859-5" },
-    { "ISO-8859-6", "iso8859-6" },
-    { "ISO-8859-7", "iso8859-7" },
-    { "ISO-8859-8", "iso8859-8" },
-    { "ISO-8859-9", "iso8859-9" },
-    { "UTF-8",      "iso8859-1" }
-  };
-
-  const char *codeset;
-  const char *result = NULL;
-  gsize i;
-
-  g_get_charset (&codeset);
-  
-  for (i = 0; i < G_N_ELEMENTS (charset_map); i++)
-    if (strcmp (charset_map[i][0], codeset) == 0)
-      {
-	result = charset_map[i][1];
-	break;
-      }
-
-  if (result != NULL)
-    return g_strdup (result);
-  else
-    return g_strdup ("iso8859-1");
-}
-
-static PangoFont *
-gdk_gl_font_use_pango_font_common (PangoFontMap               *font_map,
-                                   const PangoFontDescription *font_desc,
-                                   int                         first,
-                                   int                         count,
-                                   int                         list_base)
-{
-  PangoFont *font = NULL;
-  gchar *charset = NULL;
-  PangoXSubfont subfont_id;
-  gchar *xlfd = NULL;
-  PangoXFontCache *font_cache;
-  XFontStruct *fs;
-
-  GDK_GL_NOTE_FUNC_PRIVATE ();
-
-  font = pango_font_map_load_font (font_map, NULL, font_desc);
-  if (font == NULL)
-    {
-      g_warning ("cannot load PangoFont");
-      goto FAIL;
-    }
-
-  charset = gdk_gl_font_charset_for_locale ();
-  if (!pango_x_find_first_subfont (font, &charset, 1, &subfont_id))
-    {
-      g_warning ("cannot find PangoXSubfont");
-      font = NULL;
-      goto FAIL;
-    }
-
-  xlfd = pango_x_font_subfont_xlfd (font, subfont_id);
-  if (xlfd == NULL)
-    {
-      g_warning ("cannot get XLFD");
-      font = NULL;
-      goto FAIL;
-    }
-
-  font_cache = pango_x_font_map_get_font_cache (font_map);
-  if (font_cache == NULL)
-    {
-      g_warning ("cannot get font_cache");
-      font = NULL;
-      goto FAIL;
-    }
-
-  fs = pango_x_font_cache_load (font_cache, xlfd);
-  if (fs == NULL)
-    {
-      g_warning ("cannot load font_cache");
-      font = NULL;
-      goto FAIL;
-    }
-
-  glXUseXFont (fs->fid, first, count, list_base);
-
-  pango_x_font_cache_unload (font_cache, fs);
-
- FAIL:
-
-  if (charset != NULL)
-    g_free (charset);
-
-  if (xlfd != NULL)
-    g_free (xlfd);
-
-  return font;
-}
-
-/**
- * gdk_gl_font_use_pango_font:
- * @font_desc: a #PangoFontDescription describing the font to use.
- * @first: the index of the first glyph to be taken.
- * @count: the number of glyphs to be taken.
- * @list_base: the index of the first display list to be generated.
- *
- * Creates bitmap display lists from a #PangoFont.
- *
- * Return value: the #PangoFont used, or NULL if no font matched.
- **/
-PangoFont *
-gdk_gl_font_use_pango_font (const PangoFontDescription *font_desc,
-                            int                         first,
-                            int                         count,
-                            int                         list_base)
-{
-  PangoFontMap *font_map;
-
-  g_return_val_if_fail (font_desc != NULL, NULL);
-
-  GDK_GL_NOTE_FUNC ();
-
-#ifdef GDKGLEXT_MULTIHEAD_SUPPORT
-  font_map = pango_x_font_map_for_display (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()));
-#else  /* GDKGLEXT_MULTIHEAD_SUPPORT */
-  font_map = pango_x_font_map_for_display (gdk_x11_get_default_xdisplay ());
-#endif /* GDKGLEXT_MULTIHEAD_SUPPORT */
-
-  return gdk_gl_font_use_pango_font_common (font_map, font_desc,
-                                            first, count, list_base);
-}
-
-#ifdef GDKGLEXT_MULTIHEAD_SUPPORT
-
-/**
- * gdk_gl_font_use_pango_font_for_display:
- * @display: a #GdkDisplay.
- * @font_desc: a #PangoFontDescription describing the font to use.
- * @first: the index of the first glyph to be taken.
- * @count: the number of glyphs to be taken.
- * @list_base: the index of the first display list to be generated.
- *
- * Creates bitmap display lists from a #PangoFont.
- *
- * Return value: the #PangoFont used, or NULL if no font matched.
- **/
-PangoFont *
-gdk_gl_font_use_pango_font_for_display (GdkDisplay                 *display,
-                                        const PangoFontDescription *font_desc,
-                                        int                         first,
-                                        int                         count,
-                                        int                         list_base)
-{
-  PangoFontMap *font_map;
-
-  g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
-  g_return_val_if_fail (font_desc != NULL, NULL);
-
-  GDK_GL_NOTE_FUNC ();
-
-  font_map = pango_x_font_map_for_display (GDK_DISPLAY_XDISPLAY (display));
-
-  return gdk_gl_font_use_pango_font_common (font_map, font_desc,
-                                            first, count, list_base);
-}
-
-#endif /* GDKGLEXT_MULTIHEAD_SUPPORT */
