Pango patch (win32)



* 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

Ok to commit ?

Thanx in advance,
	Hans

diff --exclude-from=c:\util\tool\diff.ign -u -r
from-cvs/pango/pango/modules.h my-gtk/pango/pango/modules.h
--- from-cvs/pango/pango/modules.h	Fri Jan 05 19:39:54 2001
+++ my-gtk/pango/pango/modules.h	Mon Jan 08 00:18:34 2001
@@ -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 --exclude-from=c:\util\tool\diff.ign -u -r
from-cvs/pango/pango/pango.def my-gtk/pango/pango/pango.def
--- from-cvs/pango/pango/pango.def	Sun Jan 07 23:44:36 2001
+++ my-gtk/pango/pango/pango.def	Sat Feb 17 19:55:04 2001
@@ -96,7 +96,9 @@
 	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 @@
 	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 @@
 	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 --exclude-from=c:\util\tool\diff.ign -u -r
from-cvs/pango/pango/pangowin32-fontmap.c
my-gtk/pango/pango/pangowin32-fontmap.c
--- from-cvs/pango/pango/pangowin32-fontmap.c	Sat Feb 10 11:26:42 2001
+++ my-gtk/pango/pango/pangowin32-fontmap.c	Sun Feb 18 17:48:48 2001
@@ -239,6 +239,25 @@
   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 --exclude-from=c:\util\tool\diff.ign -u -r
from-cvs/pango/pango/pangowin32.c my-gtk/pango/pango/pangowin32.c
--- from-cvs/pango/pango/pangowin32.c	Sat Feb 10 11:26:42 2001
+++ my-gtk/pango/pango/pangowin32.c	Fri Feb 16 17:20:28 2001
@@ -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 @@
 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 ());
Only in my-gtk/pango/pango: testfonts.c

-------- Hans "at" Breuer "dot" Org -----------
Tell me what you need, and I'll tell you how to 
get along without it.                -- Dilbert




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]