diff options
author | Behdad Esfahbod <behdad@src.gnome.org> | 2006-09-13 18:53:50 +0000 |
---|---|---|
committer | Behdad Esfahbod <behdad@src.gnome.org> | 2006-09-13 18:53:50 +0000 |
commit | 7bf3c35e7b3070d8c9fc37dcca9097c0b9e597d6 (patch) | |
tree | 41600233f84e4b1efa013857093359f4e889de89 /pango | |
parent | 8c633b224b3d2bb5e5ddd57a84ce492bf9505781 (diff) | |
download | pango-7bf3c35e7b3070d8c9fc37dcca9097c0b9e597d6.tar.gz |
Oops, undo stuff that were committed accidentally.
Diffstat (limited to 'pango')
-rw-r--r-- | pango/break.c | 25 | ||||
-rw-r--r-- | pango/modules.c | 1 | ||||
-rw-r--r-- | pango/pango-engine.h | 2 | ||||
-rw-r--r-- | pango/shape.c | 4 |
4 files changed, 5 insertions, 27 deletions
diff --git a/pango/break.c b/pango/break.c index fc9defb7..7a23ac19 100644 --- a/pango/break.c +++ b/pango/break.c @@ -1488,17 +1488,11 @@ pango_break (const gchar *text, g_return_if_fail (analysis != NULL); g_return_if_fail (attrs != NULL); - g_message ("break"); - if (analysis->lang_engine && PANGO_ENGINE_LANG_GET_CLASS (analysis->lang_engine)->script_break) PANGO_ENGINE_LANG_GET_CLASS (analysis->lang_engine)->script_break (analysis->lang_engine, text, length, analysis, attrs, attrs_len); else pango_default_break (text, length, analysis, attrs, attrs_len); - - int i; - for (i = 0; i < attrs_len; i++) - g_message ("%d %d", attrs[i].is_cursor_position, attrs[i].backspace_deletes_character); } /** @@ -1635,7 +1629,6 @@ pango_get_log_attrs (const char *text, static guint engine_type_id = 0; static guint render_type_id = 0; PangoAnalysis analysis = { 0 }; - PangoScriptIter *iter; analysis.level = level; @@ -1654,18 +1647,8 @@ pango_get_log_attrs (const char *text, render_type_id = g_quark_from_static_string (PANGO_RENDER_TYPE_NONE); } - g_message ("logattrs %d >>>>>", length); lang_map = pango_find_map (language, engine_type_id, render_type_id); - - iter = pango_script_iter_new (text, length); - do - { - - } - while (pango_script_iter_next (iter)); - pango_script_iter_free (iter); - range_start = text; script = pango_script_for_unichar (g_utf8_get_char (text)); range_engine = (PangoEngineLang*) pango_map_get_engine (lang_map, script); @@ -1683,14 +1666,14 @@ pango_get_log_attrs (const char *text, g_assert (end - pos < length); script = pango_script_for_unichar (g_utf8_get_char (pos)); - range_engine = (PangoEngineLang*) pango_map_get_engine (lang_map, script); + analysis.lang_engine = + (PangoEngineLang*) pango_map_get_engine (lang_map, script); if (range_engine != analysis.lang_engine) { /* Engine has changed; do the breaking for the current range, * then start a new range. */ - g_message ("log break %d %d", chars_broken, chars_in_range); pango_break (range_start, pos - range_start, &analysis, @@ -1700,7 +1683,7 @@ pango_get_log_attrs (const char *text, chars_broken += chars_in_range; range_start = pos; - analysis.lang_engine = range_engine; + range_engine = analysis.lang_engine; chars_in_range = 1; } else @@ -1716,11 +1699,9 @@ pango_get_log_attrs (const char *text, g_assert (pos == end); g_assert (range_engine == analysis.lang_engine); - g_message ("log final break %d %d", chars_broken, chars_in_range); pango_break (range_start, end - range_start, &analysis, log_attrs + chars_broken, attrs_len - chars_broken); - g_message ("logattrs <<<<<"); } diff --git a/pango/modules.c b/pango/modules.c index 3ec762cd..57b13443 100644 --- a/pango/modules.c +++ b/pango/modules.c @@ -260,7 +260,6 @@ pango_engine_pair_get_engine (PangoEnginePair *pair) g_type_module_unuse (G_TYPE_MODULE (pair->module)); } - /* TODO: warn once (per id or something) */ if (!pair->engine) g_printerr ("Failed to load Pango module for id: '%s'", pair->info.id); } diff --git a/pango/pango-engine.h b/pango/pango-engine.h index 44ae681a..2bd80c92 100644 --- a/pango/pango-engine.h +++ b/pango/pango-engine.h @@ -270,7 +270,7 @@ static GType prefix ## _type; \ static void \ prefix ## _register_type (GTypeModule *module) \ { \ - const GTypeInfo object_info = \ + static const GTypeInfo object_info = \ { \ sizeof (name ## Class), \ (GBaseInitFunc) NULL, \ diff --git a/pango/shape.c b/pango/shape.c index fc165fbe..96abd21b 100644 --- a/pango/shape.c +++ b/pango/shape.c @@ -44,7 +44,7 @@ pango_shape (const gchar *text, PangoGlyphString *glyphs) { int i; - int last_cluster; + int last_cluster = -1; if (G_LIKELY (PANGO_IS_ENGINE_SHAPE (analysis->shape_engine) && PANGO_IS_FONT (analysis->font))) { @@ -109,8 +109,6 @@ pango_shape (const gchar *text, text, length, analysis, glyphs); } - /* make sure last_cluster is invalid */ - last_cluster = glyphs->log_clusters[0] - 1; for (i = 0; i < glyphs->num_glyphs; i++) { /* Set glyphs[i].attr.is_cluster_start based on log_clusters[] |