summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2010-04-23 14:56:55 -0400
committerBehdad Esfahbod <behdad@behdad.org>2010-04-23 14:56:55 -0400
commit33d4d4325e15e332105ea8f361bab79ee542f0f8 (patch)
tree26423cc3bbcf5075721fc3114077f8f23f4b34af
parent4206e9511a222c0c50cc9b4fe72ec421983bba2c (diff)
Zero glyph metrics before calling user callback
-rw-r--r--src/hb-font.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/hb-font.cc b/src/hb-font.cc
index 9c33d97..5e4e02c 100644
--- a/src/hb-font.cc
+++ b/src/hb-font.cc
@@ -62,8 +62,8 @@ hb_font_get_glyph_metrics_nil (hb_font_t *font HB_GNUC_UNUSED,
hb_face_t *face HB_GNUC_UNUSED,
const void *user_data HB_GNUC_UNUSED,
hb_codepoint_t glyph HB_GNUC_UNUSED,
- hb_glyph_metrics_t *metrics)
-{ memset (metrics, 0, sizeof (*metrics)); }
+ hb_glyph_metrics_t *metrics HB_GNUC_UNUSED)
+{ }
static hb_position_t
hb_font_get_kerning_nil (hb_font_t *font HB_GNUC_UNUSED,
@@ -205,7 +205,7 @@ void
hb_font_get_glyph_metrics (hb_font_t *font, hb_face_t *face,
hb_codepoint_t glyph, hb_glyph_metrics_t *metrics)
{
- /* TODO Zero metrics here? */
+ memset (metrics, 0, sizeof (*metrics));
return font->klass->get_glyph_metrics (font, face, font->user_data,
glyph, metrics);
}