diff options
Diffstat (limited to 'modules/syriac/syriac-fc.c')
-rw-r--r-- | modules/syriac/syriac-fc.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/modules/syriac/syriac-fc.c b/modules/syriac/syriac-fc.c index 926d486e..82270309 100644 --- a/modules/syriac/syriac-fc.c +++ b/modules/syriac/syriac-fc.c @@ -180,8 +180,7 @@ fallback_shape (PangoEngineShape *engine, PangoGlyphString *glyphs) { PangoFcFont *fc_font = PANGO_FC_FONT (font); - glong n_chars; - gunichar *wcs = g_utf8_to_ucs4_fast (text, length, &n_chars); + glong n_chars = g_utf8_strlen (text, length); const char *p; int i; @@ -239,8 +238,6 @@ fallback_shape (PangoEngineShape *engine, /* Swap all glyphs */ swap_range (glyphs, 0, glyphs->num_glyphs); } - - g_free (wcs); } static void @@ -287,6 +284,8 @@ syriac_engine_shape (PangoEngineShape *engine, properties = g_new0 (gulong, n_chars); syriac_assign_properties (wcs, properties, n_chars); + + g_free (wcs); p = text; for (i=0; i < n_chars; i++) @@ -331,7 +330,6 @@ syriac_engine_shape (PangoEngineShape *engine, pango_ot_ruleset_position (ruleset, buffer); pango_ot_buffer_output (buffer, glyphs); - g_free (wcs); g_free (properties); pango_ot_buffer_destroy (buffer); |