diff --git a/demos/gtk-demo/fontify.c b/demos/gtk-demo/fontify.c index 34b5063b46..cdbdf654d3 100644 --- a/demos/gtk-demo/fontify.c +++ b/demos/gtk-demo/fontify.c @@ -283,6 +283,14 @@ insert_tags_for_attributes (GtkTextBuffer *buffer, VOID_ATTR (sentence); break; + case PANGO_ATTR_BASELINE_SHIFT: + INT_ATTR (baseline_shift); + break; + + case PANGO_ATTR_FONT_SCALE: + INT_ATTR (font_scale); + break; + case PANGO_ATTR_SHAPE: case PANGO_ATTR_ABSOLUTE_SIZE: case PANGO_ATTR_GRAVITY: diff --git a/gtk/gtkpango.c b/gtk/gtkpango.c index 94207eb5cc..58ee7a3bf2 100644 --- a/gtk/gtkpango.c +++ b/gtk/gtkpango.c @@ -267,6 +267,21 @@ attribute_from_text (GtkBuilder *builder, case PANGO_ATTR_SENTENCE: attribute = pango_attr_sentence_new (); break; + case PANGO_ATTR_BASELINE_SHIFT: + if (gtk_builder_value_from_string_type (builder, PANGO_TYPE_BASELINE_SHIFT, value, &val, NULL)) + attribute = pango_attr_baseline_shift_new (g_value_get_enum (&val)); + else if (gtk_builder_value_from_string_type (builder, G_TYPE_INT, value, &val, NULL)) + attribute = pango_attr_baseline_shift_new (g_value_get_enum (&val)); + else + g_set_error (error, + GTK_BUILDER_ERROR, + GTK_BUILDER_ERROR_INVALID_VALUE, + "Could not parse '%s' as baseline shift value", value); + break; + case PANGO_ATTR_FONT_SCALE: + if (gtk_builder_value_from_string_type (builder, PANGO_TYPE_FONT_SCALE, value, &val, error)) + attribute = pango_attr_font_scale_new (g_value_get_enum (&val)); + break; case PANGO_ATTR_INVALID: default: break; diff --git a/gtk/gtktextbuffer.c b/gtk/gtktextbuffer.c index 67d1e47056..4ec5fe6077 100644 --- a/gtk/gtktextbuffer.c +++ b/gtk/gtktextbuffer.c @@ -4736,6 +4736,14 @@ insert_tags_for_attributes (GtkTextBuffer *buffer, VOID_ATTR (sentence); break; + case PANGO_ATTR_BASELINE_SHIFT: + INT_ATTR (baseline_shift); + break; + + case PANGO_ATTR_FONT_SCALE: + INT_ATTR (font_scale); + break; + case PANGO_ATTR_SHAPE: case PANGO_ATTR_ABSOLUTE_SIZE: case PANGO_ATTR_GRAVITY: