[gimp] app: don't overwrite all markup-set attributes with letter_spacing



commit 1d74c1f9cf03db1de91cc8506cfa9cf6f3fa6268
Author: Michael Natterer <mitch gimp org>
Date:   Wed Mar 3 10:18:31 2010 +0100

    app: don't overwrite all markup-set attributes with letter_spacing
    
    if letter_spcaing is enabled. Instead add its attribute to the ones
    which are already there.

 app/text/gimptextlayout.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/app/text/gimptextlayout.c b/app/text/gimptextlayout.c
index 8eb0702..4f84516 100644
--- a/app/text/gimptextlayout.c
+++ b/app/text/gimptextlayout.c
@@ -191,9 +191,15 @@ gimp_text_layout_new (GimpText  *text,
                                                          yres));
   if (fabs (text->letter_spacing) > 0.1)
     {
-      PangoAttrList  *attrs = pango_attr_list_new ();
+      PangoAttrList  *attrs;
       PangoAttribute *attr;
 
+      attrs = pango_layout_get_attributes (layout->layout);
+      if (attrs)
+        pango_attr_list_ref (attrs);
+      else
+        attrs = pango_attr_list_new ();
+
       attr = pango_attr_letter_spacing_new (text->letter_spacing * PANGO_SCALE);
 
       attr->start_index = 0;



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