[gimp] app: use U+2060 WORD JOINER for manual kerning



commit b61dfff04c1e6246a559f25f78f8078bd53f7341
Author: Michael Natterer <mitch gimp org>
Date:   Mon Mar 1 22:12:57 2010 +0100

    app: use U+2060 WORD JOINER for manual kerning
    
    What we used before might interact badly with arabic shaping.

 app/widgets/gimptextbuffer-serialize.c |    2 +-
 app/widgets/gimptextbuffer-serialize.h |    4 ++++
 app/widgets/gimptextbuffer.c           |    4 ++--
 3 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/app/widgets/gimptextbuffer-serialize.c b/app/widgets/gimptextbuffer-serialize.c
index c650a11..372416f 100644
--- a/app/widgets/gimptextbuffer-serialize.c
+++ b/app/widgets/gimptextbuffer-serialize.c
@@ -668,7 +668,7 @@ gimp_text_buffer_pre_serialize (GimpTextBuffer *buffer,
               GtkTextIter end;
 
               gtk_text_buffer_insert_with_tags (content, &iter,
-                                                "\342\200\215", -1,
+                                                WORD_JOINER, -1,
                                                 tag, NULL);
 
               end = iter;
diff --git a/app/widgets/gimptextbuffer-serialize.h b/app/widgets/gimptextbuffer-serialize.h
index 05e961c..8fa4b09 100644
--- a/app/widgets/gimptextbuffer-serialize.h
+++ b/app/widgets/gimptextbuffer-serialize.h
@@ -26,6 +26,10 @@
 #define __GIMP_TEXT_BUFFER_SERIALIZE_H__
 
 
+#define WORD_JOINER        "\342\201\240"
+#define WORD_JOINER_LENGTH 3
+
+
 guint8   * gimp_text_buffer_serialize        (GtkTextBuffer     *register_buffer,
                                               GtkTextBuffer     *content_buffer,
                                               const GtkTextIter *start,
diff --git a/app/widgets/gimptextbuffer.c b/app/widgets/gimptextbuffer.c
index ccd800e..374f7d2 100644
--- a/app/widgets/gimptextbuffer.c
+++ b/app/widgets/gimptextbuffer.c
@@ -788,7 +788,7 @@ gimp_text_buffer_get_iter_index (GimpTextBuffer *buffer,
 
               if (g_list_find (buffer->spacing_tags, tag))
                 {
-                  index += strlen ("\342\200\215");
+                  index += WORD_JOINER_LENGTH;
 
                   break;
                 }
@@ -848,7 +848,7 @@ gimp_text_buffer_get_iter_at_index (GimpTextBuffer *buffer,
 
               if (g_list_find (buffer->spacing_tags, tag))
                 {
-                  index -= strlen ("\342\200\215");
+                  index -= WORD_JOINER_LENGTH;
 
                   break;
                 }



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