summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2002-08-09 03:54:26 +0000
committerOwen Taylor <otaylor@src.gnome.org>2002-08-09 03:54:26 +0000
commit50d73d06b9fe6c3c1affd79c6bb88712bc83ed3d (patch)
treed6f980715820986eb7ee833aba9e451d81bf2b40
parentceb74567faa000289bae9f4110ae7752d762f597 (diff)
downloadpango-50d73d06b9fe6c3c1affd79c6bb88712bc83ed3d.tar.gz
use XAddExtension() magic to automatically clean up our information when
Thu Aug 8 23:14:27 2002 Owen Taylor <otaylor@redhat.com> * pango/pangox-fontmap.c pango/pangoxft-fontmap.c: use XAddExtension() magic to automatically clean up our information when XCloseDisplay() is called. * NEWS: Some updates for 1.1.x features. * README: Update a bit. * configure.in: Print Xft for the Xft backend, not Xft2 when printing summary.
-rw-r--r--ChangeLog13
-rw-r--r--ChangeLog.pre-1-1013
-rw-r--r--ChangeLog.pre-1-213
-rw-r--r--ChangeLog.pre-1-413
-rw-r--r--ChangeLog.pre-1-613
-rw-r--r--ChangeLog.pre-1-813
-rw-r--r--NEWS41
-rw-r--r--README54
-rw-r--r--configure.in2
-rw-r--r--pango/pangox-fontmap.c38
-rw-r--r--pango/pangoxft-fontmap.c49
11 files changed, 238 insertions, 24 deletions
diff --git a/ChangeLog b/ChangeLog
index ca653461..aaa274a6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+Thu Aug 8 23:14:27 2002 Owen Taylor <otaylor@redhat.com>
+
+ * pango/pangox-fontmap.c pango/pangoxft-fontmap.c:
+ use XAddExtension() magic to automatically clean
+ up our information when XCloseDisplay() is called.
+
+ * NEWS: Some updates for 1.1.x features.
+
+ * README: Update a bit.
+
+ * configure.in: Print Xft for the Xft backend, not Xft2
+ when printing summary.
+
Thu Aug 8 21:37:48 2002 Owen Taylor <otaylor@redhat.com>
Some fixes from #90267
diff --git a/ChangeLog.pre-1-10 b/ChangeLog.pre-1-10
index ca653461..aaa274a6 100644
--- a/ChangeLog.pre-1-10
+++ b/ChangeLog.pre-1-10
@@ -1,3 +1,16 @@
+Thu Aug 8 23:14:27 2002 Owen Taylor <otaylor@redhat.com>
+
+ * pango/pangox-fontmap.c pango/pangoxft-fontmap.c:
+ use XAddExtension() magic to automatically clean
+ up our information when XCloseDisplay() is called.
+
+ * NEWS: Some updates for 1.1.x features.
+
+ * README: Update a bit.
+
+ * configure.in: Print Xft for the Xft backend, not Xft2
+ when printing summary.
+
Thu Aug 8 21:37:48 2002 Owen Taylor <otaylor@redhat.com>
Some fixes from #90267
diff --git a/ChangeLog.pre-1-2 b/ChangeLog.pre-1-2
index ca653461..aaa274a6 100644
--- a/ChangeLog.pre-1-2
+++ b/ChangeLog.pre-1-2
@@ -1,3 +1,16 @@
+Thu Aug 8 23:14:27 2002 Owen Taylor <otaylor@redhat.com>
+
+ * pango/pangox-fontmap.c pango/pangoxft-fontmap.c:
+ use XAddExtension() magic to automatically clean
+ up our information when XCloseDisplay() is called.
+
+ * NEWS: Some updates for 1.1.x features.
+
+ * README: Update a bit.
+
+ * configure.in: Print Xft for the Xft backend, not Xft2
+ when printing summary.
+
Thu Aug 8 21:37:48 2002 Owen Taylor <otaylor@redhat.com>
Some fixes from #90267
diff --git a/ChangeLog.pre-1-4 b/ChangeLog.pre-1-4
index ca653461..aaa274a6 100644
--- a/ChangeLog.pre-1-4
+++ b/ChangeLog.pre-1-4
@@ -1,3 +1,16 @@
+Thu Aug 8 23:14:27 2002 Owen Taylor <otaylor@redhat.com>
+
+ * pango/pangox-fontmap.c pango/pangoxft-fontmap.c:
+ use XAddExtension() magic to automatically clean
+ up our information when XCloseDisplay() is called.
+
+ * NEWS: Some updates for 1.1.x features.
+
+ * README: Update a bit.
+
+ * configure.in: Print Xft for the Xft backend, not Xft2
+ when printing summary.
+
Thu Aug 8 21:37:48 2002 Owen Taylor <otaylor@redhat.com>
Some fixes from #90267
diff --git a/ChangeLog.pre-1-6 b/ChangeLog.pre-1-6
index ca653461..aaa274a6 100644
--- a/ChangeLog.pre-1-6
+++ b/ChangeLog.pre-1-6
@@ -1,3 +1,16 @@
+Thu Aug 8 23:14:27 2002 Owen Taylor <otaylor@redhat.com>
+
+ * pango/pangox-fontmap.c pango/pangoxft-fontmap.c:
+ use XAddExtension() magic to automatically clean
+ up our information when XCloseDisplay() is called.
+
+ * NEWS: Some updates for 1.1.x features.
+
+ * README: Update a bit.
+
+ * configure.in: Print Xft for the Xft backend, not Xft2
+ when printing summary.
+
Thu Aug 8 21:37:48 2002 Owen Taylor <otaylor@redhat.com>
Some fixes from #90267
diff --git a/ChangeLog.pre-1-8 b/ChangeLog.pre-1-8
index ca653461..aaa274a6 100644
--- a/ChangeLog.pre-1-8
+++ b/ChangeLog.pre-1-8
@@ -1,3 +1,16 @@
+Thu Aug 8 23:14:27 2002 Owen Taylor <otaylor@redhat.com>
+
+ * pango/pangox-fontmap.c pango/pangoxft-fontmap.c:
+ use XAddExtension() magic to automatically clean
+ up our information when XCloseDisplay() is called.
+
+ * NEWS: Some updates for 1.1.x features.
+
+ * README: Update a bit.
+
+ * configure.in: Print Xft for the Xft backend, not Xft2
+ when printing summary.
+
Thu Aug 8 21:37:48 2002 Owen Taylor <otaylor@redhat.com>
Some fixes from #90267
diff --git a/NEWS b/NEWS
index 4d471e17..0beb6669 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,44 @@
+Changes between 1.0.x and 1.1.0
+
+* Support for version 2 of the Xft library. [Keith Packard]
+* Convert the freetype backend over to using fontconfig,
+ instead of MiniXft for font cataloging.
+* A port of the Indic OpenType code from ICU to Pango. [Eric Mader]
+* A new hangul-xft [Changwoo Ryu]
+* Bug-fixes to the OpenType handling code.
+* Various cleanups to the PangoXft and PangoFT2 public APIs.
+
+============================================================
+
+Changes between 1.0.3 and 1.0.4
+
+* Add Thai shaper for Xft [Theppitak Karoonboonyanan]
+* Support GB-18030, BIG5-HKSCS, CNS-11643, GBK encodings for
+ basic-x shaper [Qingjiang (Brian) Yuan]
+* Support ksc5601.1992-3 fonts in hangul-x shpaer
+ [Qingjiang (Brian) Yuan, Changwoo Ryu]
+* Support new Arabic characters in Unicode 3.2 [Roozbeh Pournader]
+* Bug fixes [Jacob Berkman, Arnaud Charlet, David L. Cooper II,
+ Choe Hwangjin, Alex Larsson, Sven Neumann, Matthias Warkus, Yao Zhang]
+
+Changes between 1.0.2 and 1.0.3
+
+* Change algorithm for mapping points to pixels on
+ Windows to match the system method. [Joaquin Cuenca Abela,
+ Tor Lillqvist]
+* Fix family listing for the FT2 backend. [Sven Neumann]
+* Fix memory leak in pango_font_real_get_metrics() [Matthias Clasen]
+* Some compilation warning fixes. [David L. Cooper II]
+* Fix passing attr_list == NULL to pango_parse_markip [Andreas J. Guelzow]
+
+Changes between 1.0.1 and 1.0.2
+
+* Support building with FreeType 2.1.0
+* List Sans,Serif,Monospace when listing fonts for the
+ Xft and FT2 backends. (Xavier Cho)
+* Portability fixes. (David L. Cooper III, Jacob Berkman)
+* Fix problem with pango-querymodules using g_print().
+
Changes between 1.0.0 and 1.0.1
* Documentation improvements [Matthias Clasen]
diff --git a/README b/README
index dbdac61c..2bcc1c09 100644
--- a/README
+++ b/README
@@ -29,34 +29,42 @@ Dependencies
Pango depends on version 2.0.0 of the GLib library; more information
about GLib can be found at http://www.gtk.org/.
-To build optional the PangoFT2 backend you'll need the FreeType
-library from http://www.freetype.org. You'll need at least version
-2.0.1.
-
-To build the PangoX backend, you'll need the libraries from the X
-window system are needed to build Pango and GTK+. You should already
-have these installed on your system, but it's possible that you'll
-need to install the development environment for these libraries that
-your operating system vendor provides.
-
-If you have a recent version of the XFree86 system, such as 4.2.0,
-then the PangoXft backend will built, which provides anti-aliased and
-scaleable fonts in a much more sophisticated fashion then the support
-for core X fonts.
+The recommended font backend for X in Pango-1.2 is the Xft backend
+which uses version 2 of the Xft library to manage client
+side fonts. Benefits of the Xft backend include, performance,
+support for OpenType fonts, and antialiasing. Version 2 of
+Xft is available from http://keithp.com/fonts/. The 'fcpackage'
+tarball includes both Xft, and it's dependency, 'fontconfig'.
+(see below.)
+
+Note that an earlier version of Xft is shipped with version
+of XFree86 up to 4.2. This version does not work with Pango-1.2;
+Pango-1.2 requires version 2 of Xft.
+
+Both Xft and the optional PangoFT2 backend look up fonts via
+the fontconfig library, available along with Xft in the
+'fcpackage' tarball from http://keithp.com/fonts. They
+also require at least version 2.0.1 of the FreeType
+library. (http://www.freetype.org)
+
+There is also a backend that uses core X protocol fonts. This
+backend only requires the standard libraries from the X window
+system. You should already have these installed on your system, but
+it's possible that you'll need to install the development environment
+for these libraries that your operating system vendor provides.
+
+Installation of Pango on Win32 is possible, but is not documented
+here. See http://www.gimp.org/~tml/win32/downloads.html.
Notes
=====
- - A bug in older versions of Xft will cause random crashes with
- the PangoXft backend. If you want to use the Xft backend, you
- should have at least XFree86 4.2.
-
- By default, Pango tries to build itself so that no explicit
dependency on Xft or FreeType will be introduced in apps that
- link to Pango. This is to avoid compatibility problems when
- Xft version 2 is introduced. Specifying --enable-explicit-deps
- or --enable-static when configuring Pango will defeat this
- and should be avoided if possible.
+ link to Pango. This is to avoid compatibility problems with
+ changes in the Xft or FreeType API's or ABI's. Specifying
+ --enable-explicit-deps or --enable-static when configuring Pango
+ will defeat this and should be avoided if possible.
License
=======
@@ -67,4 +75,4 @@ COPYING for details.
Owen Taylor
otaylor@redhat.com
-7 March 2002
+8 August 2002
diff --git a/configure.in b/configure.in
index c7c19ca9..06489d71 100644
--- a/configure.in
+++ b/configure.in
@@ -776,5 +776,5 @@ esac])
echo "configuration:
backends: `if $have_freetype ; then echo " FreeType"; fi \
``if $have_x ; then echo " X"; fi \
- ``if $have_xft ; then echo " Xft2"; fi \
+ ``if $have_xft ; then echo " Xft"; fi \
``if $have_win32 ; then echo " Win32"; fi`"
diff --git a/pango/pangox-fontmap.c b/pango/pangox-fontmap.c
index 52db3e77..9ff8ee93 100644
--- a/pango/pangox-fontmap.c
+++ b/pango/pangox-fontmap.c
@@ -27,6 +27,9 @@
#include <X11/Xatom.h>
+/* For XExtSetCloseDisplay */
+#include <X11/Xlibint.h>
+
#include "pango-fontmap.h"
#include "pango-utils.h"
#include "pangox-private.h"
@@ -215,6 +218,39 @@ pango_x_font_map_class_init (PangoFontMapClass *class)
class->list_families = pango_x_font_map_list_families;
}
+/*
+ * Hackery to set up notification when a Display is closed
+ */
+static GSList *registered_displays;
+
+static int
+close_display_cb (Display *display,
+ XExtCodes *extcodes)
+{
+ pango_x_shutdown_display (display);
+ registered_displays = g_slist_remove (registered_displays, display);
+
+ return 0;
+}
+
+static void
+register_display (Display *display)
+{
+ XExtCodes *extcodes;
+ GSList *tmp_list;
+
+ for (tmp_list = registered_displays; tmp_list; tmp_list = tmp_list->next)
+ {
+ if (tmp_list->data == display)
+ return;
+ }
+
+ registered_displays = g_slist_prepend (registered_displays, display);
+
+ extcodes = XAddExtension (display);
+ XESetCloseDisplay (display, extcodes->extension, close_display_cb);
+}
+
static GList *fontmaps = NULL;
/**
@@ -285,6 +321,8 @@ pango_x_font_map_for_display (Display *display)
xfontmap->resolution = (PANGO_SCALE * 72.27 / 25.4) * ((double) DisplayWidthMM (xfontmap->display, screen) /
DisplayWidth (xfontmap->display, screen));
+ register_display (xfontmap->display);
+
return PANGO_FONT_MAP (xfontmap);
}
diff --git a/pango/pangoxft-fontmap.c b/pango/pangoxft-fontmap.c
index 84249f0e..5fe720f0 100644
--- a/pango/pangoxft-fontmap.c
+++ b/pango/pangoxft-fontmap.c
@@ -26,6 +26,9 @@
#include "pangoxft-private.h"
#include "modules.h"
+/* For XExtSetCloseDisplay */
+#include <X11/Xlibint.h>
+
/* Number of freed fonts */
#define MAX_FREED_FONTS 128
@@ -260,6 +263,50 @@ pango_xft_find_font_map (Display *display,
return NULL;
}
+/*
+ * Hackery to set up notification when a Display is closed
+ */
+static GSList *registered_displays;
+
+static int
+close_display_cb (Display *display,
+ XExtCodes *extcodes)
+{
+ GSList *tmp_list;
+
+ tmp_list = fontmaps;
+ while (tmp_list)
+ {
+ PangoXftFontMap *xfontmap = tmp_list->data;
+ tmp_list = tmp_list->next;
+
+ if (xfontmap->display == display)
+ pango_xft_shutdown_display (display, xfontmap->screen);
+ }
+
+ registered_displays = g_slist_remove (registered_displays, display);
+
+ return 0;
+}
+
+static void
+register_display (Display *display)
+{
+ XExtCodes *extcodes;
+ GSList *tmp_list;
+
+ for (tmp_list = registered_displays; tmp_list; tmp_list = tmp_list->next)
+ {
+ if (tmp_list->data == display)
+ return;
+ }
+
+ registered_displays = g_slist_prepend (registered_displays, display);
+
+ extcodes = XAddExtension (display);
+ XESetCloseDisplay (display, extcodes->extension, close_display_cb);
+}
+
/**
* pango_xft_get_font_map:
* @display: an X display
@@ -313,6 +360,8 @@ pango_xft_get_font_map (Display *display,
(GDestroyNotify)pango_coverage_unref);
xfontmap->freed_fonts = g_queue_new ();
+ register_display (display);
+
fontmaps = g_slist_prepend (fontmaps, xfontmap);
return PANGO_FONT_MAP (xfontmap);