diff options
author | Owen Taylor <otaylor@redhat.com> | 2005-06-14 19:41:42 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2005-06-14 19:41:42 +0000 |
commit | ed399c9dd5c824cf9540fd93672fe11a3fe008dc (patch) | |
tree | fa688bf2b952f961d4e0577eae60e3c658056e90 | |
parent | 7a4dd44160b0d14c10f7f02b4e604a9ed546ee2c (diff) | |
download | pango-ed399c9dd5c824cf9540fd93672fe11a3fe008dc.tar.gz |
Fix FALSE/TRUE typo that was causing crashes with fonts not containing
2005-06-14 Owen Taylor <otaylor@redhat.com>
* pango/ellipsize.c (shape_ellipsis): Fix FALSE/TRUE
typo that was causing crashes with fonts not containing
".". (#304039, Sebastien Bacher)
* pango/pango-context.c (itemize_state_fill_shaper): Allow
font to be NULL.
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | ChangeLog.pre-1-10 | 9 | ||||
-rw-r--r-- | pango/ellipsize.c | 5 | ||||
-rw-r--r-- | pango/pango-context.c | 5 |
4 files changed, 25 insertions, 3 deletions
@@ -1,5 +1,14 @@ 2005-06-14 Owen Taylor <otaylor@redhat.com> + * pango/ellipsize.c (shape_ellipsis): Fix FALSE/TRUE + typo that was causing crashes with fonts not containing + ".". (#304039, Sebastien Bacher) + + * pango/pango-context.c (itemize_state_fill_shaper): Allow + font to be NULL. + +2005-06-14 Owen Taylor <otaylor@redhat.com> + * pango/pango-context.c (itemize_state_finish): Fix potential leak of state->base_font. (#168930, Ben Maurer, Aivars Kalvans) diff --git a/ChangeLog.pre-1-10 b/ChangeLog.pre-1-10 index 498456fa..3d851744 100644 --- a/ChangeLog.pre-1-10 +++ b/ChangeLog.pre-1-10 @@ -1,5 +1,14 @@ 2005-06-14 Owen Taylor <otaylor@redhat.com> + * pango/ellipsize.c (shape_ellipsis): Fix FALSE/TRUE + typo that was causing crashes with fonts not containing + ".". (#304039, Sebastien Bacher) + + * pango/pango-context.c (itemize_state_fill_shaper): Allow + font to be NULL. + +2005-06-14 Owen Taylor <otaylor@redhat.com> + * pango/pango-context.c (itemize_state_finish): Fix potential leak of state->base_font. (#168930, Ben Maurer, Aivars Kalvans) diff --git a/pango/ellipsize.c b/pango/ellipsize.c index 350d0ca3..39649461 100644 --- a/pango/ellipsize.c +++ b/pango/ellipsize.c @@ -347,14 +347,15 @@ shape_ellipsis (EllipsizeState *state) /* If that fails we use "..." in the first matching font */ - if (!_pango_engine_shape_covers (item->analysis.shape_engine, item->analysis.font, + if (!item->analysis.font || + !_pango_engine_shape_covers (item->analysis.shape_engine, item->analysis.font, item->analysis.language, g_utf8_get_char (ellipsis_text))) { pango_item_free (item); /* Modify the fallback iter while it is inside the PangoAttrList; Don't try this at home */ - ((PangoAttrInt *)fallback)->value = FALSE; + ((PangoAttrInt *)fallback)->value = TRUE; ellipsis_text = "..."; item = itemize_text (state, ellipsis_text, attrs); diff --git a/pango/pango-context.c b/pango/pango-context.c index b6926e2f..8b568129 100644 --- a/pango/pango-context.c +++ b/pango/pango-context.c @@ -783,7 +783,10 @@ itemize_state_fill_shaper (ItemizeState *state, PangoItem *item = l->data; if (item->analysis.shape_engine) break; - item->analysis.font = g_object_ref (font); + if (font) + item->analysis.font = g_object_ref (font); + else + item->analysis.font = NULL; item->analysis.shape_engine = shape_engine; } } |