summaryrefslogtreecommitdiff
path: root/pango
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2001-01-03 10:45:12 +0000
committerAlexander Larsson <alexl@src.gnome.org>2001-01-03 10:45:12 +0000
commitd5b358fe3e5123842533ea445460d8a337eced5d (patch)
treec51bb9232a7933ca280f68737a0c60b4c9b11250 /pango
parentdc23b8bf572adc64cb57be39fdaf02732e50bb72 (diff)
downloadpango-d5b358fe3e5123842533ea445460d8a337eced5d.tar.gz
Update the default list of included modules for
2001-01-03 Alexander Larsson <alexl@redhat.com> * configure.in: Update the default list of included modules for --with-included-modules=yes to include all new modules. Split INCLUDED_MODULES and module-defs.c into per shaper engine type lists. * modules/arabic/Makefile.am: Build libpango-arabic-xft.la if INCLUDE_ARABIC_XFT. * modules/arabic/arabic-xft.c: Change module prefix to _pango_arabic_xft_ * modules/basic/Makefile.am: Build static libs for all included modules. * modules/basic/basic-ft2.c: Change module prefix to _pango_basic_ft2_ * modules/basic/basic-xft.c: Change module prefix to _pango_basic_xft_ * pango/Makefile.am: Include correct module-defs-XXX in libs. * pango/modules.h: Split _pango_included_modules[] into separate lists. * pango/pangox.c: * pango/pangoft2.c: * pango/pangoxft-fontmap.c: Register built in modules.
Diffstat (limited to 'pango')
-rw-r--r--pango/Makefile.am18
-rw-r--r--pango/modules.h4
-rw-r--r--pango/pangoft2.c13
-rw-r--r--pango/pangox.c4
-rw-r--r--pango/pangoxft-fontmap.c11
5 files changed, 38 insertions, 12 deletions
diff --git a/pango/Makefile.am b/pango/Makefile.am
index 66287f9f..56e03616 100644
--- a/pango/Makefile.am
+++ b/pango/Makefile.am
@@ -69,7 +69,7 @@ libpango_la_SOURCES = \
libpangox_la_SOURCES = \
modules.h \
- module-defs.c \
+ module-defs-x.c \
pangox.c \
pangox-private.h \
pangox-fontcache.c \
@@ -87,13 +87,13 @@ libpango_la_LIBADD = mini-fribidi/libmini-fribidi.la
endif
libpangox_la_LDFLAGS = -release $(VERSION)
-libpangox_la_LIBADD = $(INCLUDED_MODULES) $(X_LIBS)
-
+libpangox_la_LIBADD = $(X_LIBS) $(INCLUDED_X_MODULES)
libpangoxft_la_SOURCES = \
pangoxft-font.c \
- pangoxft-fontmap.c
+ pangoxft-fontmap.c \
+ module-defs-xft.c
-libpangoxft_la_LIBADD = $(INCLUDED_MODULES) $(XFT_LIBS) opentype/libpango-ot.la
+libpangoxft_la_LIBADD = $(INCLUDED_XFT_MODULES) $(XFT_LIBS) opentype/libpango-ot.la
libpangoxft_la_LDFLAGS = -release $(VERSION)
libpangoft2_la_SOURCES = \
@@ -101,10 +101,11 @@ libpangoft2_la_SOURCES = \
pangoft2.c \
pangoft2-private.h \
pangoft2-fontcache.c \
- pangoft2-fontmap.c
+ pangoft2-fontmap.c \
+ module-defs-ft2.c
-libpangoxft_la_LIBADD = $(INCLUDED_MODULES) $(FREETYPE_LIBS)
-libpangoxft_la_LDFLAGS = -release $(VERSION)
+libpangoft2_la_LIBADD = $(INCLUDED_FT2_MODULES) $(FREETYPE_LIBS)
+libpangoft2_la_LDFLAGS = -release $(VERSION)
pangoincludedir=$(includedir)/pango-1.0/pango
@@ -155,6 +156,7 @@ EXTRA_DIST = \
$(pango_built_headers) \
makeenums.pl \
module-defs.c.win32 \
+ module-defs.h \
pango.def \
pangowin32.def \
pangowin32.h \
diff --git a/pango/modules.h b/pango/modules.h
index 409fb433..2e1b73e2 100644
--- a/pango/modules.h
+++ b/pango/modules.h
@@ -25,6 +25,8 @@
#ifndef __MODULES_H__
#define __MODULES_H__
-extern PangoIncludedModule _pango_included_modules[];
+extern PangoIncludedModule _pango_included_x_modules[];
+extern PangoIncludedModule _pango_included_xft_modules[];
+extern PangoIncludedModule _pango_included_ft2_modules[];
#endif /* __MODULES_H__ */
diff --git a/pango/pangoft2.c b/pango/pangoft2.c
index 902a81d4..37198e50 100644
--- a/pango/pangoft2.c
+++ b/pango/pangoft2.c
@@ -33,6 +33,7 @@
#include "pango-utils.h"
#include "pangoft2.h"
#include "pangoft2-private.h"
+#include "modules.h"
#define PANGO_TYPE_FT2_FONT (pango_ft2_font_get_type ())
#define PANGO_FT2_FONT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_FT2_FONT, PangoFT2Font))
@@ -155,7 +156,17 @@ PangoContext *
pango_ft2_get_context (void)
{
PangoContext *result;
-
+ static gboolean registered_modules = FALSE;
+ int i;
+
+ if (!registered_modules)
+ {
+ registered_modules = TRUE;
+
+ for (i = 0; _pango_included_ft2_modules[i].list; i++)
+ pango_module_register (&_pango_included_ft2_modules[i]);
+ }
+
result = pango_context_new ();
pango_context_add_font_map (result, pango_ft2_font_map_for_display ());
diff --git a/pango/pangox.c b/pango/pangox.c
index 7dd7f00c..3c8a9d1f 100644
--- a/pango/pangox.c
+++ b/pango/pangox.c
@@ -256,8 +256,8 @@ pango_x_get_context (Display *display)
{
registered_modules = TRUE;
- for (i = 0; _pango_included_modules[i].list; i++)
- pango_module_register (&_pango_included_modules[i]);
+ for (i = 0; _pango_included_x_modules[i].list; i++)
+ pango_module_register (&_pango_included_x_modules[i]);
}
result = pango_context_new ();
diff --git a/pango/pangoxft-fontmap.c b/pango/pangoxft-fontmap.c
index df1e31f7..ce81ba4d 100644
--- a/pango/pangoxft-fontmap.c
+++ b/pango/pangoxft-fontmap.c
@@ -22,6 +22,7 @@
#include "pango-fontmap.h"
#include "pangoxft.h"
#include "pangoxft-private.h"
+#include "modules.h"
#include "X11/Xft/XftFreetype.h"
@@ -183,9 +184,19 @@ pango_xft_get_context (Display *display,
int screen)
{
PangoContext *result;
+ int i;
+ static gboolean registered_modules = FALSE;
g_return_val_if_fail (display != NULL, NULL);
+ if (!registered_modules)
+ {
+ registered_modules = TRUE;
+
+ for (i = 0; _pango_included_xft_modules[i].list; i++)
+ pango_module_register (&_pango_included_xft_modules[i]);
+ }
+
result = pango_context_new ();
pango_context_add_font_map (result, pango_xft_get_font_map (display, screen));