summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog10
-rw-r--r--docs/tmpl/glyphs.sgml1
-rw-r--r--pango/glyphstring.c6
-rw-r--r--pango/pango-glyph.h3
-rw-r--r--pango/pango-layout.c6
-rw-r--r--pango/pango-renderer.c2
6 files changed, 17 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index d57cb2aa..35ae23d9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
2006-07-08 Behdad Esfahbod <behdad@gnome.org>
+ * pango/glyphstring.c (pango_glyph_string_get_width):
+ * pango/pango-glyph.h:
+ * pango/pango-layout.c (pango_layout_line_index_to_x),
+ (pango_layout_line_x_to_index), (pango_layout_line_get_x_ranges):
+ * pango/pango-renderer.c (pango_renderer_draw_layout_line): Fix silly
+ error in implementation of pango_glyph_string_get_width(), and also
+ remove unused font parameter from its signature.
+
+2006-07-08 Behdad Esfahbod <behdad@gnome.org>
+
* configure.in: Remove obsolete checks for varargs that were
preivously used by the OpenType code, but are not needed with
HarfBuzz anymore.
diff --git a/docs/tmpl/glyphs.sgml b/docs/tmpl/glyphs.sgml
index 8292c688..54daf25e 100644
--- a/docs/tmpl/glyphs.sgml
+++ b/docs/tmpl/glyphs.sgml
@@ -388,7 +388,6 @@ The #GObject type for #PangoGlyphString.
</para>
@glyphs:
-@font:
@Returns:
diff --git a/pango/glyphstring.c b/pango/glyphstring.c
index 82770349..353fa2a4 100644
--- a/pango/glyphstring.c
+++ b/pango/glyphstring.c
@@ -266,7 +266,6 @@ pango_glyph_string_extents (PangoGlyphString *glyphs,
/**
* pango_glyph_string_get_width:
* @glyphs: a #PangoGlyphString
- * @font: a #PangoFont
*
* Computes the logical width of the glyph string as can also be computed
* using pango_glyph_string_extents(). However, since this only computes the
@@ -278,14 +277,13 @@ pango_glyph_string_extents (PangoGlyphString *glyphs,
* Since: 1.14
*/
int
-pango_glyph_string_get_width (PangoGlyphString *glyphs,
- PangoFont *font)
+pango_glyph_string_get_width (PangoGlyphString *glyphs)
{
int i;
int width = 0;
for (i = 0; i < glyphs->num_glyphs; i++)
- width += &glyphs->glyphs[i].geometry.width;
+ width += glyphs->glyphs[i].geometry.width;
return width;
}
diff --git a/pango/pango-glyph.h b/pango/pango-glyph.h
index 71b6911e..92a8e6f8 100644
--- a/pango/pango-glyph.h
+++ b/pango/pango-glyph.h
@@ -91,8 +91,7 @@ void pango_glyph_string_extents (PangoGlyphString *glyphs,
PangoFont *font,
PangoRectangle *ink_rect,
PangoRectangle *logical_rect);
-int pango_glyph_string_get_width(PangoGlyphString *glyphs,
- PangoFont *font);
+int pango_glyph_string_get_width(PangoGlyphString *glyphs);
void pango_glyph_string_extents_range (PangoGlyphString *glyphs,
int start,
diff --git a/pango/pango-layout.c b/pango/pango-layout.c
index 69e6b95d..bd76a265 100644
--- a/pango/pango-layout.c
+++ b/pango/pango-layout.c
@@ -1168,7 +1168,7 @@ pango_layout_line_index_to_x (PangoLayoutLine *line,
}
if (!properties.shape_set)
- width += pango_glyph_string_get_width (run->glyphs, run->item->analysis.font);
+ width += pango_glyph_string_get_width (run->glyphs);
else
width += properties.shape_logical_rect->width;
@@ -3577,7 +3577,7 @@ pango_layout_line_x_to_index (PangoLayoutLine *line,
if (properties.shape_set)
logical_width = properties.shape_logical_rect->width;
else
- logical_width = pango_glyph_string_get_width (run->glyphs, run->item->analysis.font);
+ logical_width = pango_glyph_string_get_width (run->glyphs);
if (x_pos >= start_pos && x_pos < start_pos + logical_width)
{
@@ -3782,7 +3782,7 @@ pango_layout_line_get_x_ranges (PangoLayoutLine *line,
}
if (tmp_list->next)
- accumulated_width += pango_glyph_string_get_width (run->glyphs, run->item->analysis.font);
+ accumulated_width += pango_glyph_string_get_width (run->glyphs);
tmp_list = tmp_list->next;
}
diff --git a/pango/pango-renderer.c b/pango/pango-renderer.c
index 4c96972a..c53f645d 100644
--- a/pango/pango-renderer.c
+++ b/pango/pango-renderer.c
@@ -496,7 +496,7 @@ pango_renderer_draw_layout_line (PangoRenderer *renderer,
renderer->strikethrough)
pango_glyph_string_extents (run->glyphs, run->item->analysis.font,
&ink_rect, NULL);
- glyph_string_width = pango_glyph_string_get_width (run->glyphs, run->item->analysis.font);
+ glyph_string_width = pango_glyph_string_get_width (run->glyphs);
}
state.logical_rect_end = x + x_off + glyph_string_width;