summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Breuer <hans@breuer.org>2001-05-06 13:58:53 +0000
committerHans Breuer <hans@src.gnome.org>2001-05-06 13:58:53 +0000
commitf10f21057c5fb0626ec16a2e743c68f6f7ee2cab (patch)
tree5ee2b7007984745d329f0bddd258f59e6de16a41
parentff742696f6b093aad1384d879405f51da3b220d3 (diff)
downloadpango-f10f21057c5fb0626ec16a2e743c68f6f7ee2cab.tar.gz
reflect new version number, removed external fribidi dependency from link
2001-01-06 Hans Breuer <hans@breuer.org> * pango/makefile.msc : reflect new version number, removed external fribidi dependency from link step as well * pango/pango.def : updated externals * pango/pangowin32.c : initialize approximate_(digit|char)_width similar to what the other backends do
-rw-r--r--ChangeLog10
-rw-r--r--ChangeLog.pre-1-010
-rw-r--r--ChangeLog.pre-1-1010
-rw-r--r--ChangeLog.pre-1-210
-rw-r--r--ChangeLog.pre-1-410
-rw-r--r--ChangeLog.pre-1-610
-rw-r--r--ChangeLog.pre-1-810
-rw-r--r--pango/makefile.msc12
-rw-r--r--pango/pango.def1
-rw-r--r--pango/pangowin32.c27
10 files changed, 104 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 33873691..c171996b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2001-01-06 Hans Breuer <hans@breuer.org>
+
+ * pango/makefile.msc : reflect new version number, removed
+ external fribidi dependency from link step as well
+
+ * pango/pango.def : updated externals
+
+ * pango/pangowin32.c : initialize approximate_(digit|char)_width
+ similar to what the other backends do
+
Fri May 4 11:07:04 2001 Owen Taylor <otaylor@redhat.com>
* NEWS: Update for 0.16
diff --git a/ChangeLog.pre-1-0 b/ChangeLog.pre-1-0
index 33873691..c171996b 100644
--- a/ChangeLog.pre-1-0
+++ b/ChangeLog.pre-1-0
@@ -1,3 +1,13 @@
+2001-01-06 Hans Breuer <hans@breuer.org>
+
+ * pango/makefile.msc : reflect new version number, removed
+ external fribidi dependency from link step as well
+
+ * pango/pango.def : updated externals
+
+ * pango/pangowin32.c : initialize approximate_(digit|char)_width
+ similar to what the other backends do
+
Fri May 4 11:07:04 2001 Owen Taylor <otaylor@redhat.com>
* NEWS: Update for 0.16
diff --git a/ChangeLog.pre-1-10 b/ChangeLog.pre-1-10
index 33873691..c171996b 100644
--- a/ChangeLog.pre-1-10
+++ b/ChangeLog.pre-1-10
@@ -1,3 +1,13 @@
+2001-01-06 Hans Breuer <hans@breuer.org>
+
+ * pango/makefile.msc : reflect new version number, removed
+ external fribidi dependency from link step as well
+
+ * pango/pango.def : updated externals
+
+ * pango/pangowin32.c : initialize approximate_(digit|char)_width
+ similar to what the other backends do
+
Fri May 4 11:07:04 2001 Owen Taylor <otaylor@redhat.com>
* NEWS: Update for 0.16
diff --git a/ChangeLog.pre-1-2 b/ChangeLog.pre-1-2
index 33873691..c171996b 100644
--- a/ChangeLog.pre-1-2
+++ b/ChangeLog.pre-1-2
@@ -1,3 +1,13 @@
+2001-01-06 Hans Breuer <hans@breuer.org>
+
+ * pango/makefile.msc : reflect new version number, removed
+ external fribidi dependency from link step as well
+
+ * pango/pango.def : updated externals
+
+ * pango/pangowin32.c : initialize approximate_(digit|char)_width
+ similar to what the other backends do
+
Fri May 4 11:07:04 2001 Owen Taylor <otaylor@redhat.com>
* NEWS: Update for 0.16
diff --git a/ChangeLog.pre-1-4 b/ChangeLog.pre-1-4
index 33873691..c171996b 100644
--- a/ChangeLog.pre-1-4
+++ b/ChangeLog.pre-1-4
@@ -1,3 +1,13 @@
+2001-01-06 Hans Breuer <hans@breuer.org>
+
+ * pango/makefile.msc : reflect new version number, removed
+ external fribidi dependency from link step as well
+
+ * pango/pango.def : updated externals
+
+ * pango/pangowin32.c : initialize approximate_(digit|char)_width
+ similar to what the other backends do
+
Fri May 4 11:07:04 2001 Owen Taylor <otaylor@redhat.com>
* NEWS: Update for 0.16
diff --git a/ChangeLog.pre-1-6 b/ChangeLog.pre-1-6
index 33873691..c171996b 100644
--- a/ChangeLog.pre-1-6
+++ b/ChangeLog.pre-1-6
@@ -1,3 +1,13 @@
+2001-01-06 Hans Breuer <hans@breuer.org>
+
+ * pango/makefile.msc : reflect new version number, removed
+ external fribidi dependency from link step as well
+
+ * pango/pango.def : updated externals
+
+ * pango/pangowin32.c : initialize approximate_(digit|char)_width
+ similar to what the other backends do
+
Fri May 4 11:07:04 2001 Owen Taylor <otaylor@redhat.com>
* NEWS: Update for 0.16
diff --git a/ChangeLog.pre-1-8 b/ChangeLog.pre-1-8
index 33873691..c171996b 100644
--- a/ChangeLog.pre-1-8
+++ b/ChangeLog.pre-1-8
@@ -1,3 +1,13 @@
+2001-01-06 Hans Breuer <hans@breuer.org>
+
+ * pango/makefile.msc : reflect new version number, removed
+ external fribidi dependency from link step as well
+
+ * pango/pango.def : updated externals
+
+ * pango/pangowin32.c : initialize approximate_(digit|char)_width
+ similar to what the other backends do
+
Fri May 4 11:07:04 2001 Owen Taylor <otaylor@redhat.com>
* NEWS: Update for 0.16
diff --git a/pango/makefile.msc b/pango/makefile.msc
index 8bdad901..3e8a8d5d 100644
--- a/pango/makefile.msc
+++ b/pango/makefile.msc
@@ -6,11 +6,11 @@ PERL = perl
!ENDIF
# Possibly override Pango version from build/win32/module.defs
-PANGO_VER = 0.13
+PANGO_VER = 0.16
# INCLUDES = -I .. -I .
# DEFINES =
-# DEPCFLAGS = $(GLIB_CFLAGS) $(LIBICONV_CFLAGS) $(FRIBIDI_CFLAGS) $(FREETYPE2_CFLAGS)
+# DEPCFLAGS = $(GLIB_CFLAGS) $(LIBICONV_CFLAGS) $(FREETYPE2_CFLAGS)
!IFNDEF PACKAGE
@@ -38,18 +38,18 @@ 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)
+PKG_CFLAGS = -I.. -I. -I$(PRJ_TOP) $(GLIB_CFLAGS) $(LIBICONV_CFLAGS) $(FREETYPE2_CFLAGS)
!IFDEF OBJS_pango
# don't link with itself
-PKG_LINK = $(GLIB_LIBS) $(FRIBIDI_LIBS)
+PKG_LINK = $(GLIB_LIBS)
!ELSE
#not yet $(FREETYPE2_LIBS)
!IFDEF OBJS_pangowin32
-PKG_LINK = $(GLIB_LIBS) $(LIBICONV_LIBS) $(FRIBIDI_LIBS) \
+PKG_LINK = $(GLIB_LIBS) $(LIBICONV_LIBS) \
pango-$(PANGO_VER).lib
!ELSE
-PKG_LINK = $(GLIB_LIBS) $(LIBICONV_LIBS) $(FRIBIDI_LIBS) \
+PKG_LINK = $(GLIB_LIBS) $(LIBICONV_LIBS) \
pango-$(PANGO_VER).lib pangowin32-$(PANGO_VER).lib
!ENDIF
!ENDIF
diff --git a/pango/pango.def b/pango/pango.def
index 9c7c8d10..780a5dce 100644
--- a/pango/pango.def
+++ b/pango/pango.def
@@ -149,6 +149,7 @@ EXPORTS
pango_layout_set_font_description
pango_layout_set_indent
pango_layout_set_justify
+ pango_layout_set_single_paragraph_mode
pango_layout_set_spacing
pango_layout_set_tabs
pango_layout_set_text
diff --git a/pango/pangowin32.c b/pango/pangowin32.c
index f3f91d8c..6bfe0293 100644
--- a/pango/pangowin32.c
+++ b/pango/pangowin32.c
@@ -653,12 +653,16 @@ get_font_metrics_from_subfonts (PangoFont *font,
{
metrics->ascent = tm.tmAscent * PANGO_SCALE;
metrics->descent = tm.tmDescent * PANGO_SCALE;
+ metrics->approximate_digit_width = /* really an approximation ... */
+ metrics->approximate_char_width = tm.tmAveCharWidth * PANGO_SCALE;
first = FALSE;
}
else
{
metrics->ascent = MAX (tm.tmAscent * PANGO_SCALE, metrics->ascent);
metrics->descent = MAX (tm.tmDescent * PANGO_SCALE, metrics->descent);
+ metrics->approximate_digit_width = /* really an approximation ... */
+ metrics->approximate_char_width = MAX(tm.tmAveCharWidth * PANGO_SCALE, metrics->approximate_char_width);
}
}
}
@@ -845,12 +849,35 @@ pango_win32_font_get_metrics (PangoFont *font,
if (!tmp_list)
{
+ PangoLayout *layout;
+ PangoRectangle extents;
+ PangoContext *context;
+
+ win32font->metrics_by_lang = g_slist_prepend (win32font->metrics_by_lang, info);
+
info = g_new (PangoWin32MetricsInfo, 1);
info->lang = lookup_lang;
win32font->metrics_by_lang = g_slist_prepend (win32font->metrics_by_lang, info);
get_font_metrics_from_string (font, lang, str, &info->metrics);
+
+ /* lovely copy&paste programming (from pangox.c) */
+ /* This is sort of a sledgehammer solution, but we cache this
+ * stuff so not a huge deal hopefully. Get the avg. width of the
+ * chars in "0123456789"
+ */
+ context = pango_win32_get_context ();
+ pango_context_set_lang (context, lookup_lang);
+ layout = pango_layout_new (context);
+ pango_layout_set_text (layout, "0123456789", -1);
+
+ pango_layout_get_extents (layout, NULL, &extents);
+
+ info->metrics.approximate_digit_width = extents.width / 10.0;
+
+ g_object_unref (G_OBJECT (layout));
+ g_object_unref (G_OBJECT (context));
}
*metrics = info->metrics;