summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Breuer <hans@breuer.org>2001-02-19 20:53:56 +0000
committerHans Breuer <hans@src.gnome.org>2001-02-19 20:53:56 +0000
commita7e7e50eea273f1b7f50da041bea1a53782b06f8 (patch)
tree815a65c866ac716200fe8d004631df0372be20ad
parentf261f4ca89bade8bf24ef5a76dbb68bd113cc748 (diff)
downloadpango-a7e7e50eea273f1b7f50da041bea1a53782b06f8.tar.gz
added _pango_included_win32_modules[] to include modules with plain win32
2001-02-19 Hans Breuer <hans@breuer.org> * pango/modules.h, pango/pangowin32.c (pango_win32_get_context) : added _pango_included_win32_modules[] to include modules with plain win32 build as well. * pango/pango.def : added new exported functions * pango/pangowin32-fontmap.c : add unspecified fonts for Monospace, Sans and Serif to avoid crashes if no alias file is provided * pango/*/makefile.msc : new files to build on windoze with msvc
-rw-r--r--ChangeLog12
-rw-r--r--ChangeLog.pre-1-012
-rw-r--r--ChangeLog.pre-1-1012
-rw-r--r--ChangeLog.pre-1-212
-rw-r--r--ChangeLog.pre-1-412
-rw-r--r--ChangeLog.pre-1-612
-rw-r--r--ChangeLog.pre-1-812
-rw-r--r--examples/makefile.msc65
-rw-r--r--pango/makefile.msc158
-rw-r--r--pango/modules.h1
-rw-r--r--pango/pango.def9
-rw-r--r--pango/pangowin32-fontmap.c19
-rw-r--r--pango/pangowin32.c11
13 files changed, 344 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index b4f780fd..8356faa1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2001-02-19 Hans Breuer <hans@breuer.org>
+ * pango/modules.h, pango/pangowin32.c (pango_win32_get_context) :
+ added _pango_included_win32_modules[] to include modules with plain
+ win32 build as well.
+
+ * pango/pango.def : added new exported functions
+
+ * pango/pangowin32-fontmap.c : add unspecified fonts for Monospace,
+ Sans and Serif to avoid crashes if no alias file is provided
+
+ * pango/*/makefile.msc : new files to build on windoze with msvc
+
2001-02-15 Havoc Pennington <hp@redhat.com>
* pango/pango-layout.c (pango_layout_line_x_to_index): fix
diff --git a/ChangeLog.pre-1-0 b/ChangeLog.pre-1-0
index b4f780fd..8356faa1 100644
--- a/ChangeLog.pre-1-0
+++ b/ChangeLog.pre-1-0
@@ -1,3 +1,15 @@
+2001-02-19 Hans Breuer <hans@breuer.org>
+ * pango/modules.h, pango/pangowin32.c (pango_win32_get_context) :
+ added _pango_included_win32_modules[] to include modules with plain
+ win32 build as well.
+
+ * pango/pango.def : added new exported functions
+
+ * pango/pangowin32-fontmap.c : add unspecified fonts for Monospace,
+ Sans and Serif to avoid crashes if no alias file is provided
+
+ * pango/*/makefile.msc : new files to build on windoze with msvc
+
2001-02-15 Havoc Pennington <hp@redhat.com>
* pango/pango-layout.c (pango_layout_line_x_to_index): fix
diff --git a/ChangeLog.pre-1-10 b/ChangeLog.pre-1-10
index b4f780fd..8356faa1 100644
--- a/ChangeLog.pre-1-10
+++ b/ChangeLog.pre-1-10
@@ -1,3 +1,15 @@
+2001-02-19 Hans Breuer <hans@breuer.org>
+ * pango/modules.h, pango/pangowin32.c (pango_win32_get_context) :
+ added _pango_included_win32_modules[] to include modules with plain
+ win32 build as well.
+
+ * pango/pango.def : added new exported functions
+
+ * pango/pangowin32-fontmap.c : add unspecified fonts for Monospace,
+ Sans and Serif to avoid crashes if no alias file is provided
+
+ * pango/*/makefile.msc : new files to build on windoze with msvc
+
2001-02-15 Havoc Pennington <hp@redhat.com>
* pango/pango-layout.c (pango_layout_line_x_to_index): fix
diff --git a/ChangeLog.pre-1-2 b/ChangeLog.pre-1-2
index b4f780fd..8356faa1 100644
--- a/ChangeLog.pre-1-2
+++ b/ChangeLog.pre-1-2
@@ -1,3 +1,15 @@
+2001-02-19 Hans Breuer <hans@breuer.org>
+ * pango/modules.h, pango/pangowin32.c (pango_win32_get_context) :
+ added _pango_included_win32_modules[] to include modules with plain
+ win32 build as well.
+
+ * pango/pango.def : added new exported functions
+
+ * pango/pangowin32-fontmap.c : add unspecified fonts for Monospace,
+ Sans and Serif to avoid crashes if no alias file is provided
+
+ * pango/*/makefile.msc : new files to build on windoze with msvc
+
2001-02-15 Havoc Pennington <hp@redhat.com>
* pango/pango-layout.c (pango_layout_line_x_to_index): fix
diff --git a/ChangeLog.pre-1-4 b/ChangeLog.pre-1-4
index b4f780fd..8356faa1 100644
--- a/ChangeLog.pre-1-4
+++ b/ChangeLog.pre-1-4
@@ -1,3 +1,15 @@
+2001-02-19 Hans Breuer <hans@breuer.org>
+ * pango/modules.h, pango/pangowin32.c (pango_win32_get_context) :
+ added _pango_included_win32_modules[] to include modules with plain
+ win32 build as well.
+
+ * pango/pango.def : added new exported functions
+
+ * pango/pangowin32-fontmap.c : add unspecified fonts for Monospace,
+ Sans and Serif to avoid crashes if no alias file is provided
+
+ * pango/*/makefile.msc : new files to build on windoze with msvc
+
2001-02-15 Havoc Pennington <hp@redhat.com>
* pango/pango-layout.c (pango_layout_line_x_to_index): fix
diff --git a/ChangeLog.pre-1-6 b/ChangeLog.pre-1-6
index b4f780fd..8356faa1 100644
--- a/ChangeLog.pre-1-6
+++ b/ChangeLog.pre-1-6
@@ -1,3 +1,15 @@
+2001-02-19 Hans Breuer <hans@breuer.org>
+ * pango/modules.h, pango/pangowin32.c (pango_win32_get_context) :
+ added _pango_included_win32_modules[] to include modules with plain
+ win32 build as well.
+
+ * pango/pango.def : added new exported functions
+
+ * pango/pangowin32-fontmap.c : add unspecified fonts for Monospace,
+ Sans and Serif to avoid crashes if no alias file is provided
+
+ * pango/*/makefile.msc : new files to build on windoze with msvc
+
2001-02-15 Havoc Pennington <hp@redhat.com>
* pango/pango-layout.c (pango_layout_line_x_to_index): fix
diff --git a/ChangeLog.pre-1-8 b/ChangeLog.pre-1-8
index b4f780fd..8356faa1 100644
--- a/ChangeLog.pre-1-8
+++ b/ChangeLog.pre-1-8
@@ -1,3 +1,15 @@
+2001-02-19 Hans Breuer <hans@breuer.org>
+ * pango/modules.h, pango/pangowin32.c (pango_win32_get_context) :
+ added _pango_included_win32_modules[] to include modules with plain
+ win32 build as well.
+
+ * pango/pango.def : added new exported functions
+
+ * pango/pangowin32-fontmap.c : add unspecified fonts for Monospace,
+ Sans and Serif to avoid crashes if no alias file is provided
+
+ * pango/*/makefile.msc : new files to build on windoze with msvc
+
2001-02-15 Havoc Pennington <hp@redhat.com>
* pango/pango-layout.c (pango_layout_line_x_to_index): fix
diff --git a/examples/makefile.msc b/examples/makefile.msc
new file mode 100644
index 00000000..5b5eb8ce
--- /dev/null
+++ b/examples/makefile.msc
@@ -0,0 +1,65 @@
+TOP = ../..
+!INCLUDE $(TOP)/build/win32/make.msc
+
+# INCLUDES = -I .. -I .
+# DEFINES =
+# DEPCFLAGS = $(GLIB_CFLAGS) $(LIBICONV_CFLAGS) $(FRIBIDI_CFLAGS) $(FREETYPE2_CFLAGS)
+
+!IFNDEF PACKAGE
+
+EXES = viewer_win32 # viewer_ft2
+
+# The main target
+all : sub-all
+
+sub-all:
+ for %d in ($(EXES)) do nmake -nologo -f makefile.msc sub-one-exe THIS=%d
+
+sub-one-dll:
+ nmake -nologo -f makefile.msc $(THIS)-$(PANGO_VER).dll PACKAGE=$(THIS) OBJS_$(THIS)=1
+
+sub-one-exe:
+ nmake -nologo -f makefile.msc $(THIS).exe PACKAGE=$(THIS) OBJS_$(THIS)=1
+
+!ELSE
+
+PRJ_TOP = ..
+PKG_VER = $(PANGO_VER)
+PKG_DEF = $(PACKAGE).def
+
+PKG_CFLAGS = -I. -I$(PRJ_TOP) $(GLIB_CFLAGS) $(GTK2_CFLAGS) $(PANGO_CFLAGS) $(LIBICONV_CFLAGS) $(FRIBIDI_CFLAGS) $(FREETYPE2_CFLAGS)
+
+#not yet $(FREETYPE2_LIBS)
+PKG_LINK = $(GLIB_LIBS) $(GTK2_LIBS) $(LIBICONV_LIBS) $(FRIBIDI_LIBS) $(PANGOWIN32_LIBS)
+
+!IFDEF OBJS_viewer_win32
+OBJECTS = \
+ viewer-win32.obj
+!ENDIF
+
+!IFDEF OBJS_viewer_ft2
+OBJECTS = \
+ viewer-ft2.obj
+!ENDIF
+
+!IFNDEF OBJECTS
+OBJECTS = $(PACKAGE).obj
+!ENDIF
+
+$(PACKAGE).lib : $(OBJECTS)
+ lib /out:$(PACKAGE).lib $(OBJECTS)
+
+$(PACKAGE)-$(PKG_VER).dll : $(OBJECTS) $(PKG_DEF)
+ $(CC) $(CFLAGS) -LD -Fe$(PACKAGE)-$(PKG_VER).dll $(OBJECTS) $(PKG_LINK) user32.lib gdi32.lib advapi32.lib $(LDFLAGS) /def:$(PKG_DEF)
+
+$(PACKAGE).exe : $(PKG_LINK) $(OBJECTS)
+ $(CC) $(CFLAGS) -Fe$(PACKAGE).exe $(OBJECTS) $(PKG_LINK)
+
+
+$(PRJ_TOP)\config.h: $(PRJ_TOP)\config.h.win32
+ copy $(PRJ_TOP)\config.h.win32 $(PRJ_TOP)\config.h
+
+.c.obj :
+ $(CC) $(CFLAGS) -GD -c $(PKG_CFLAGS) $<
+
+!ENDIF #PACKAGE \ No newline at end of file
diff --git a/pango/makefile.msc b/pango/makefile.msc
new file mode 100644
index 00000000..8bdad901
--- /dev/null
+++ b/pango/makefile.msc
@@ -0,0 +1,158 @@
+TOP = ../..
+!INCLUDE $(TOP)/build/win32/make.msc
+
+!IFNDEF PERL
+PERL = perl
+!ENDIF
+
+# Possibly override Pango version from build/win32/module.defs
+PANGO_VER = 0.13
+
+# INCLUDES = -I .. -I .
+# DEFINES =
+# DEPCFLAGS = $(GLIB_CFLAGS) $(LIBICONV_CFLAGS) $(FRIBIDI_CFLAGS) $(FREETYPE2_CFLAGS)
+
+!IFNDEF PACKAGE
+
+DLLS = pango pangowin32 # pangoft2
+EXES = querymodules testfonts
+#? test1 test2 test3 test4 test5
+
+# The main target
+all : \
+ sub-all
+
+sub-all:
+ for %d in ($(DLLS)) do nmake -nologo -f makefile.msc sub-one-dll THIS=%d
+ for %d in ($(EXES)) do nmake -nologo -f makefile.msc sub-one-exe THIS=%d
+
+sub-one-dll:
+ nmake -nologo -f makefile.msc $(THIS)-$(PANGO_VER).dll PACKAGE=$(THIS) OBJS_$(THIS)=1
+
+sub-one-exe:
+ nmake -nologo -f makefile.msc $(THIS).exe PACKAGE=$(THIS) OBJS_$(THIS)=1
+
+!ELSE
+
+PRJ_TOP = ..
+PKG_VER = $(PANGO_VER)
+PKG_DEF = $(PACKAGE).def
+
+PKG_CFLAGS = -I.. -I. -I$(PRJ_TOP) $(GLIB_CFLAGS) $(LIBICONV_CFLAGS) $(FRIBIDI_CFLAGS) $(FREETYPE2_CFLAGS)
+
+!IFDEF OBJS_pango
+# don't link with itself
+PKG_LINK = $(GLIB_LIBS) $(FRIBIDI_LIBS)
+!ELSE
+#not yet $(FREETYPE2_LIBS)
+!IFDEF OBJS_pangowin32
+PKG_LINK = $(GLIB_LIBS) $(LIBICONV_LIBS) $(FRIBIDI_LIBS) \
+ pango-$(PANGO_VER).lib
+!ELSE
+PKG_LINK = $(GLIB_LIBS) $(LIBICONV_LIBS) $(FRIBIDI_LIBS) \
+ pango-$(PANGO_VER).lib pangowin32-$(PANGO_VER).lib
+!ENDIF
+!ENDIF
+
+!IFDEF OBJS_pango
+OBJECTS = \
+ break.obj \
+ fonts.obj \
+ glyphstring.obj \
+ mapping.obj \
+ modules.obj \
+ pango-attributes.obj \
+ pango-context.obj \
+ pango-coverage.obj \
+ pango-fontmap.obj \
+ pango-intset.obj \
+ pango-item.obj \
+ pango-markup.obj \
+ pango-layout.obj \
+ pango-tabs.obj \
+ pango-utils.obj \
+ reorder-items.obj \
+ shape.obj \
+ pango-enum-types.obj \
+ fribidi.obj \
+ fribidi_get_type.obj
+!ENDIF
+
+basic-win32.obj : ..\modules\basic\basic-win32.c
+ $(CC) $(PKG_CFLAGS) -GD -DMODULE_PREFIX -c ..\modules\basic\basic-win32.c
+
+fribidi.obj : mini-fribidi\fribidi.c
+ $(CC) $(PKG_CFLAGS) -GD -c mini-fribidi\fribidi.c
+fribidi_get_type.obj : mini-fribidi\fribidi_get_type.c
+ $(CC) $(PKG_CFLAGS) -GD -c mini-fribidi\fribidi_get_type.c
+
+!IFDEF OBJS_pangowin32
+OBJECTS = \
+ module-defs-win32.obj \
+ pangowin32.obj \
+ pangowin32-fontcache.obj \
+ pangowin32-fontmap.obj \
+ basic-win32.obj
+!ENDIF
+
+!IFDEF OBJS_pangoft2
+OBJECTS = \
+ pangoft2.obj \
+ pangoft2-fontcache.obj \
+ pangoft2-fontmap.obj
+!ENDIF
+
+!IFDEF OBJS_querymodules
+OBJECTS = \
+ querymodules.obj
+!ENDIF
+
+!IFNDEF OBJECTS
+OBJECTS = $(PACKAGE).obj
+!ENDIF
+
+module-defs.c : module-defs.c.win32
+ copy module-defs.c.win32 module-defs.c
+
+pango_headers= \
+ pango.h \
+ pango-attributes.h \
+ pango-break.h \
+ pango-context.h \
+ pango-coverage.h \
+ pango-engine.h \
+ pango-font.h \
+ pango-fontmap.h \
+ pango-glyph.h \
+ pango-indic.h \
+ pango-item.h \
+ pango-layout.h \
+ pango-modules.h \
+ pango-tabs.h \
+ pango-types.h \
+ pango-utils.h \
+ pangox.h
+
+pango-enum-types.h: $(pango_headers) makeenums.pl
+ $(PERL) ./makeenums.pl include $(pango_headers) > pango-enum-types.h
+
+pango-enum-types.c: $(pango_headers) makeenums.pl pango-enum-types.h
+ $(PERL) ./makeenums.pl cfile $(pango_headers) > pango-enum-types.c
+
+$(PACKAGE).lib : $(OBJECTS) $(PRJ_TOP)\config.h
+ lib /out:$(PACKAGE).lib $(OBJECTS)
+
+$(PACKAGE)-$(PKG_VER).dll : $(OBJECTS) $(PKG_DEF) $(PRJ_TOP)\config.h
+ $(CC) $(CFLAGS) -LD -Fe$(PACKAGE)-$(PKG_VER).dll $(OBJECTS) $(PKG_LINK) user32.lib gdi32.lib advapi32.lib $(LDFLAGS) /def:$(PKG_DEF)
+
+$(PACKAGE).exe : $(PKG_LINK) $(OBJECTS)
+ $(CC) $(CFLAGS) -Fe$(PACKAGE).exe $(OBJECTS) $(PKG_LINK) gdi32.lib user32.lib
+
+
+$(PRJ_TOP)\config.h: $(PRJ_TOP)\config.h.win32
+ copy $(PRJ_TOP)\config.h.win32 $(PRJ_TOP)\config.h
+
+.c.obj :
+ $(CC) $(CFLAGS) -GD -c $(PKG_CFLAGS) -DPANGO_VERSION=\"$(PANGO_VER)\" $<
+
+!ENDIF #PACKAGE \ No newline at end of file
diff --git a/pango/modules.h b/pango/modules.h
index 2e1b73e2..56707b06 100644
--- a/pango/modules.h
+++ b/pango/modules.h
@@ -28,5 +28,6 @@
extern PangoIncludedModule _pango_included_x_modules[];
extern PangoIncludedModule _pango_included_xft_modules[];
extern PangoIncludedModule _pango_included_ft2_modules[];
+extern PangoIncludedModule _pango_included_win32_modules[];
#endif /* __MODULES_H__ */
diff --git a/pango/pango.def b/pango/pango.def
index 1828f007..242b37e1 100644
--- a/pango/pango.def
+++ b/pango/pango.def
@@ -96,7 +96,9 @@ EXPORTS
pango_item_new
pango_itemize
pango_layout_context_changed
+ pango_layout_copy
pango_layout_get_alignment
+ pango_layout_get_attributes
pango_layout_get_context
pango_layout_get_cursor_pos
pango_layout_get_extents
@@ -128,13 +130,13 @@ EXPORTS
pango_layout_iter_get_line_yrange
pango_layout_iter_get_run
pango_layout_iter_get_run_extents
- pango_layout_line_get_extents
- pango_layout_line_get_pixel_extents
- pango_layout_line_get_x_ranges
pango_layout_iter_next_char
pango_layout_iter_next_cluster
pango_layout_iter_next_line
pango_layout_iter_next_run
+ pango_layout_line_get_extents
+ pango_layout_line_get_pixel_extents
+ pango_layout_line_get_x_ranges
pango_layout_line_index_to_x
pango_layout_line_ref
pango_layout_line_unref
@@ -150,6 +152,7 @@ EXPORTS
pango_layout_set_tabs
pango_layout_set_text
pango_layout_set_width
+ pango_layout_set_wrap
pango_layout_xy_to_index
pango_log2vis_get_embedding_levels
pango_map_get_engine
diff --git a/pango/pangowin32-fontmap.c b/pango/pangowin32-fontmap.c
index f32f92cb..a91510ad 100644
--- a/pango/pangowin32-fontmap.c
+++ b/pango/pangowin32-fontmap.c
@@ -239,6 +239,25 @@ pango_win32_font_map_for_display (void)
logfont.lfCharSet = DEFAULT_CHARSET;
EnumFontFamiliesEx (pango_win32_hdc, &logfont, (FONTENUMPROC) pango_win32_enum_proc, 0, 0);
+ /* There are fonts installed on every system, use these
+ * as fallback. Otherwise Really Bad Things (tm) would
+ * happen without an alias file ...
+ * (The names are required for Pango and may be resolved
+ * to different fonts on different systems)
+ */
+ memset (&logfont, 0, sizeof (logfont));
+ strcpy (logfont.lfFaceName, "monospace");
+ logfont.lfPitchAndFamily = FF_MODERN;
+ pango_win32_insert_font (fontmap, &logfont);
+
+ strcpy (logfont.lfFaceName, "sans");
+ logfont.lfPitchAndFamily = FF_SWISS;
+ pango_win32_insert_font (fontmap, &logfont);
+
+ strcpy (logfont.lfFaceName, "serif");
+ logfont.lfPitchAndFamily = FF_ROMAN;
+ pango_win32_insert_font (fontmap, &logfont);
+
pango_win32_font_map_read_aliases (fontmap);
SystemParametersInfo(SPI_GETWORKAREA, 0, &rect, 0);
diff --git a/pango/pangowin32.c b/pango/pangowin32.c
index e6320f03..c14e3190 100644
--- a/pango/pangowin32.c
+++ b/pango/pangowin32.c
@@ -29,6 +29,7 @@
#include "pango-utils.h"
#include "pangowin32.h"
#include "pangowin32-private.h"
+#include "modules.h"
#define PANGO_TYPE_WIN32_FONT (pango_win32_font_get_type ())
#define PANGO_WIN32_FONT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_WIN32_FONT, PangoWin32Font))
@@ -171,6 +172,16 @@ PangoContext *
pango_win32_get_context (void)
{
PangoContext *result;
+ static gboolean registered_modules = FALSE;
+ int i;
+
+ if (!registered_modules)
+ {
+ registered_modules = TRUE;
+
+ for (i = 0; _pango_included_win32_modules[i].list; i++)
+ pango_module_register (&_pango_included_win32_modules[i]);
+ }
result = pango_context_new ();
pango_context_add_font_map (result, pango_win32_font_map_for_display ());