[gimp/gimp-2-8] Bug 735505 - Weird Characters in Zoom Button



commit 7e658a61db2d5b2c7ca3631ca0fdcec157e27383
Author: Michael Natterer <mitch gimp org>
Date:   Sat Sep 27 23:48:39 2014 +0200

    Bug 735505 - Weird Characters in Zoom Button
    
    On windows, use a normal space instead of U+2009 THIN SPACE for
    separating the scale percentage from the percent sign.
    
    (cherry picked from commit c5ed3e56c9fabb3a93b39ef17f95e07172c83b98)

 app/display/gimpscalecombobox.c |   18 +++++++++++++++---
 1 files changed, 15 insertions(+), 3 deletions(-)
---
diff --git a/app/display/gimpscalecombobox.c b/app/display/gimpscalecombobox.c
index 61e0ebb..d6574d1 100644
--- a/app/display/gimpscalecombobox.c
+++ b/app/display/gimpscalecombobox.c
@@ -377,14 +377,26 @@ gimp_scale_combo_box_scale_iter_set (GtkListStore *store,
 {
   gchar label[32];
 
-  /*  use U+2009 THIN SPACE to seperate the percent sign from the number */
+#ifdef G_OS_WIN32
+
+  /*  use a normal space until pango's windows backend uses harfbuzz,
+   *  see bug #735505
+   */
+#define PERCENT_SPACE " "
+
+#else
+
+  /*  use U+2009 THIN SPACE to separate the percent sign from the number */
+#define PERCENT_SPACE "\342\200\211"
+
+#endif
 
   if (scale > 1.0)
     g_snprintf (label, sizeof (label),
-                "%d\342\200\211%%", (gint) ROUND (100.0 * scale));
+                "%d" PERCENT_SPACE "%%", (gint) ROUND (100.0 * scale));
   else
     g_snprintf (label, sizeof (label),
-                "%.3g\342\200\211%%", 100.0 * scale);
+                "%.3g" PERCENT_SPACE "%%", 100.0 * scale);
 
   gtk_list_store_set (store, iter,
                       COLUMN_SCALE,      scale,


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