diff -ruN gtkglext-1.2.0.orig/configure.in gtkglext-1.2.0/configure.in --- gtkglext-1.2.0.orig/configure.in 2006-02-05 03:17:19.000000000 +0000 +++ gtkglext-1.2.0/configure.in 2020-04-28 12:35:21.905828768 +0000 @@ -59,10 +59,6 @@ m4_define([pango_pkg], [pango]) m4_define([pango_required_version], [1.0.0]) -# Pangox -m4_define([pangox_pkg], [pangox]) -m4_define([pangox_required_version], [1.0.0]) - # PangoFT2 m4_define([pangoft2_pkg], [pangoft2]) m4_define([pangoft2_required_version], [1.0.0]) @@ -349,7 +345,6 @@ gtk_pkg >= gtk_required_version \ gdk_pkg >= gdk_required_version \ pango_pkg >= pango_required_version \ -pangox_pkg >= pangox_required_version \ gmodule_pkg >= gmodule_required_version \ ]) @@ -794,7 +789,7 @@ # CFLAGS and LIBS ################################################## -GDKGLEXT_PACKAGES="gdk_pkg pango_pkg pangox_pkg gmodule_pkg" +GDKGLEXT_PACKAGES="gdk_pkg pango_pkg gmodule_pkg" GDKGLEXT_EXTRA_CFLAGS="$GL_CFLAGS $GDKGLEXT_WIN_CFLAGS" GDKGLEXT_EXTRA_LIBS="$GL_LIBS $GDKGLEXT_WIN_LIBS" GDKGLEXT_DEP_CFLAGS="$GDKGLEXT_EXTRA_CFLAGS `$PKG_CONFIG --cflags $GDKGLEXT_PACKAGES`" diff -ruN gtkglext-1.2.0.orig/examples/font.c gtkglext-1.2.0/examples/font.c --- gtkglext-1.2.0.orig/examples/font.c 2003-11-06 18:04:46.000000000 +0000 +++ gtkglext-1.2.0/examples/font.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,349 +0,0 @@ -/* - * font.c: - * Simple bitmap font rendering example. - * - * written by Naofumi Yasufuku - */ - -#include -#include - -#include - -#include - -#ifdef G_OS_WIN32 -#define WIN32_LEAN_AND_MEAN 1 -#include -#endif - -#include -#include - -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 -ruN gtkglext-1.2.0.orig/examples/Makefile.am gtkglext-1.2.0/examples/Makefile.am --- gtkglext-1.2.0.orig/examples/Makefile.am 2003-09-09 09:50:04.000000000 +0000 +++ gtkglext-1.2.0/examples/Makefile.am 2020-04-28 12:38:52.422260365 +0000 @@ -45,7 +45,6 @@ pixmap-mixed \ share-lists \ color \ - font \ button \ shapes \ logo \ @@ -101,10 +100,6 @@ color_DEPENDENCIES = $(DEPS) color_LDADD = $(LDADDS) -font_SOURCES = font.c -font_DEPENDENCIES = $(DEPS) -font_LDADD = $(LDADDS) - button_SOURCES = button.c button_DEPENDENCIES = $(DEPS) button_LDADD = $(LDADDS) diff -ruN gtkglext-1.2.0.orig/gdk/gdkglfont.h gtkglext-1.2.0/gdk/gdkglfont.h --- gtkglext-1.2.0.orig/gdk/gdkglfont.h 2004-02-20 09:38:10.000000000 +0000 +++ gtkglext-1.2.0/gdk/gdkglfont.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 -#include - -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 -ruN gtkglext-1.2.0.orig/gdk/gdkgl.h gtkglext-1.2.0/gdk/gdkgl.h --- gtkglext-1.2.0.orig/gdk/gdkgl.h 2004-02-20 09:38:10.000000000 +0000 +++ gtkglext-1.2.0/gdk/gdkgl.h 2020-04-28 12:36:16.503298432 +0000 @@ -33,7 +33,6 @@ #include #include #include -#include #include #endif /* __GDK_GL_H__ */ diff -ruN gtkglext-1.2.0.orig/gdk/Makefile.am gtkglext-1.2.0/gdk/Makefile.am --- gtkglext-1.2.0.orig/gdk/Makefile.am 2003-08-15 09:10:38.000000000 +0000 +++ gtkglext-1.2.0/gdk/Makefile.am 2020-04-28 12:36:09.336526338 +0000 @@ -76,7 +76,6 @@ gdkgldrawable.h \ gdkglpixmap.h \ gdkglwindow.h \ - gdkglfont.h \ gdkglshapes.h \ gdkglglext.h diff -ruN gtkglext-1.2.0.orig/gdk/win32/gdkglfont-win32.c gtkglext-1.2.0/gdk/win32/gdkglfont-win32.c --- gtkglext-1.2.0.orig/gdk/win32/gdkglfont-win32.c 2004-02-20 09:38:13.000000000 +0000 +++ gtkglext-1.2.0/gdk/win32/gdkglfont-win32.c 1970-01-01 00:00:00.000000000 +0000 @@ -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 - -#include "gdkglwin32.h" -#include "gdkglprivate-win32.h" -#include "gdkglfont.h" - -#ifdef GDKGLEXT_MULTIHEAD_SUPPORT -#include -#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 -ruN gtkglext-1.2.0.orig/gdk/win32/Makefile.am gtkglext-1.2.0/gdk/win32/Makefile.am --- gtkglext-1.2.0.orig/gdk/win32/Makefile.am 2003-08-15 01:39:54.000000000 +0000 +++ gtkglext-1.2.0/gdk/win32/Makefile.am 2020-04-28 12:36:35.270241212 +0000 @@ -36,7 +36,6 @@ gdkgldrawable-win32.c \ gdkglpixmap-win32.c \ gdkglwindow-win32.c \ - gdkglfont-win32.c \ gdkglwglext.c gdkglext_win32_headers = \ diff -ruN gtkglext-1.2.0.orig/gdk/x11/gdkglfont-x11.c gtkglext-1.2.0/gdk/x11/gdkglfont-x11.c --- gtkglext-1.2.0.orig/gdk/x11/gdkglfont-x11.c 2004-02-20 09:38:14.000000000 +0000 +++ gtkglext-1.2.0/gdk/x11/gdkglfont-x11.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,196 +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 - -#include - -#include "gdkglx.h" -#include "gdkglprivate-x11.h" -#include "gdkglfont.h" - -#ifdef GDKGLEXT_MULTIHEAD_SUPPORT -#include -#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 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; - 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); - - fs = pango_x_font_cache_load (font_cache, xlfd); - - 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 */ diff -ruN gtkglext-1.2.0.orig/gdk/x11/Makefile.am gtkglext-1.2.0/gdk/x11/Makefile.am --- gtkglext-1.2.0.orig/gdk/x11/Makefile.am 2003-05-07 18:18:42.000000000 +0000 +++ gtkglext-1.2.0/gdk/x11/Makefile.am 2020-04-28 12:37:19.780896258 +0000 @@ -38,7 +38,6 @@ gdkgldrawable-x11.c \ gdkglpixmap-x11.c \ gdkglwindow-x11.c \ - gdkglfont-x11.c \ gdkglglxext.c gdkglext_x11_headers = \