summaryrefslogtreecommitdiff
path: root/pango/pangocairo-atsuifont.c
diff options
context:
space:
mode:
Diffstat (limited to 'pango/pangocairo-atsuifont.c')
-rw-r--r--pango/pangocairo-atsuifont.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/pango/pangocairo-atsuifont.c b/pango/pangocairo-atsuifont.c
index 7706fbf8..ac060ccd 100644
--- a/pango/pangocairo-atsuifont.c
+++ b/pango/pangocairo-atsuifont.c
@@ -24,6 +24,7 @@
#import <Cocoa/Cocoa.h>
+#include "pango-impl-utils.h"
#include "pangoatsui-private.h"
#include "pangocairo.h"
#include "pangocairo-private.h"
@@ -148,7 +149,7 @@ pango_cairo_atsui_font_create_metrics_for_context (PangoCairoFont *font,
pango_layout_set_text (layout, sample_str, -1);
pango_layout_get_extents (layout, NULL, &extents);
- metrics->approximate_char_width = extents.width / g_utf8_strlen (sample_str, -1);
+ metrics->approximate_char_width = extents.width / pango_utf8_strwidth (sample_str);
pango_layout_set_text (layout, "0123456789", -1);
metrics->approximate_digit_width = max_glyph_width (layout);