[pango/line-breaker] attributes: Fix some oversights



commit 9143d51645b11aa08456fa5f44e08df94e58f228
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Jan 24 00:40:03 2022 -0500

    attributes: Fix some oversights
    
    The new attribute types weren't handled
    everywhere yet. Fix that.

 pango/pango-attributes.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
---
diff --git a/pango/pango-attributes.c b/pango/pango-attributes.c
index 8f58fe6e..01683af3 100644
--- a/pango/pango-attributes.c
+++ b/pango/pango-attributes.c
@@ -1642,9 +1642,11 @@ pango_attribute_as_int (PangoAttribute *attr)
     case PANGO_ATTR_INSERT_HYPHENS:
     case PANGO_ATTR_OVERLINE:
     case PANGO_ATTR_ABSOLUTE_LINE_HEIGHT:
+    case PANGO_ATTR_LINE_SPACING:
     case PANGO_ATTR_TEXT_TRANSFORM:
     case PANGO_ATTR_WORD:
     case PANGO_ATTR_SENTENCE:
+    case PANGO_ATTR_PARAGRAPH:
     case PANGO_ATTR_BASELINE_SHIFT:
     case PANGO_ATTR_FONT_SCALE:
       return (PangoAttrInt *)attr;
@@ -2715,7 +2717,12 @@ attr_print (GString        *str,
   else if ((features = pango_attribute_as_font_features (attr)) != NULL)
     g_string_append_printf (str, " \"%s\"", features->features);
   else
-    g_assert_not_reached ();
+    {
+      g_warning ("Unhandled attribute type %s (%d)\n",
+                 get_attr_type_nick (attr->klass->type),
+                 attr->klass->type);
+      g_assert_not_reached ();
+    }
 }
 
 /**


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]