[pango/fix-asciid-call] Fix a g_ascii_formatd call




commit 54794dc9becb0d67fb1bcfd1a980d2bfafda1e77
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Jan 18 12:30:38 2022 -0500

    Fix a g_ascii_formatd call
    
    We were passing a format specifier that starts
    with ' ', which some implementations of that API
    don't like.
    
    This change removes an extraneous space from the
    output. Update affected tests.
    
    Fixes: #659

 pango/pango-attributes.c        |  2 +-
 tests/markups/valid-1.expected  |  2 +-
 tests/markups/valid-16.expected | 10 +++++-----
 tests/markups/valid-2.expected  |  2 +-
 tests/markups/valid-23.expected |  2 +-
 tests/markups/valid-4.expected  |  4 ++--
 tests/markups/valid-8.expected  | 18 +++++++++---------
 7 files changed, 20 insertions(+), 20 deletions(-)
---
diff --git a/pango/pango-attributes.c b/pango/pango-attributes.c
index 696f9ba1..60d14706 100644
--- a/pango/pango-attributes.c
+++ b/pango/pango-attributes.c
@@ -2646,7 +2646,7 @@ attr_print (GString        *str,
   else if ((flt = pango_attribute_as_float (attr)) != NULL)
     {
       char buf[20];
-      g_ascii_formatd (buf, 20, " %f", flt->value);
+      g_ascii_formatd (buf, 20, "%f", flt->value);
       g_string_append_printf (str, " %s", buf);
     }
   else if ((font = pango_attribute_as_font_desc (attr)) != NULL)
diff --git a/tests/markups/valid-1.expected b/tests/markups/valid-1.expected
index be01bfaf..92e23837 100644
--- a/tests/markups/valid-1.expected
+++ b/tests/markups/valid-1.expected
@@ -4,7 +4,7 @@ Blue text is cool!
 ---
 
 range 0 9
-0 9 scale  1.440000
+0 9 scale 1.440000
 0 9 foreground #00000000ffff
 range 9 13
 range 13 17
diff --git a/tests/markups/valid-16.expected b/tests/markups/valid-16.expected
index a8a0dcd2..556c4db2 100644
--- a/tests/markups/valid-16.expected
+++ b/tests/markups/valid-16.expected
@@ -4,15 +4,15 @@ larger and smaller and smaller now with base
 ---
 
 range 0 11
-0 44 scale  1.200000
+0 44 scale 1.200000
 range 11 19
-11 30 scale  1.000000
+11 30 scale 1.000000
 range 19 30
-19 30 scale  0.833333
+19 30 scale 0.833333
 range 30 31
-0 44 scale  1.200000
+0 44 scale 1.200000
 range 31 44
-0 44 scale  1.200000
+0 44 scale 1.200000
 31 44 size 15360
 range 44 2147483647
 
diff --git a/tests/markups/valid-2.expected b/tests/markups/valid-2.expected
index 63da62d4..378d49bb 100644
--- a/tests/markups/valid-2.expected
+++ b/tests/markups/valid-2.expected
@@ -4,7 +4,7 @@ Blue text is cool!
 ---
 
 range 0 9
-0 9 scale  1.728000
+0 9 scale 1.728000
 0 9 foreground #00000000ffff
 range 9 13
 range 13 17
diff --git a/tests/markups/valid-23.expected b/tests/markups/valid-23.expected
index 296faf0a..59db8634 100644
--- a/tests/markups/valid-23.expected
+++ b/tests/markups/valid-23.expected
@@ -7,7 +7,7 @@ range 0 5
 0 9 font-desc "Cantarell 11"
 range 5 9
 0 9 font-desc "Cantarell 11"
-5 9 scale  2.000000
+5 9 scale 2.000000
 range 9 2147483647
 
 
diff --git a/tests/markups/valid-4.expected b/tests/markups/valid-4.expected
index 615e2adc..345e8699 100644
--- a/tests/markups/valid-4.expected
+++ b/tests/markups/valid-4.expected
@@ -7,7 +7,7 @@ range 0 5
 0 15 weight bold
 range 5 8
 0 15 weight bold
-5 8 scale  1.200000
+5 8 scale 1.200000
 range 8 9
 0 15 weight bold
 range 9 15
@@ -24,7 +24,7 @@ range 32 33
 16 41 strikethrough true
 range 33 38
 16 41 strikethrough true
-33 38 scale  0.833333
+33 38 scale 0.833333
 range 38 41
 16 41 strikethrough true
 38 41 font-scale superscript
diff --git a/tests/markups/valid-8.expected b/tests/markups/valid-8.expected
index 89310b78..a4fac193 100644
--- a/tests/markups/valid-8.expected
+++ b/tests/markups/valid-8.expected
@@ -12,53 +12,53 @@ Text
 ---
 
 range 0 4
-0 4 scale  0.578704
+0 4 scale 0.578704
 0 4 variant normal
 0 4 stretch ultra-condensed
 0 4 foreground #00000000ffff
 0 4 foreground-alpha 65535
 range 4 5
 range 5 9
-5 9 scale  0.694444
+5 9 scale 0.694444
 5 9 variant small-caps
 5 9 stretch extra-condensed
 5 9 foreground #00000000ffff
 5 9 foreground-alpha 32767
 range 9 10
 range 10 14
-10 14 scale  0.833333
+10 14 scale 0.833333
 10 14 stretch condensed
 10 14 background #00000000ffff
 10 14 background-alpha 1
 range 14 15
 range 15 19
-15 19 scale  1.000000
+15 19 scale 1.000000
 15 19 stretch semi-condensed
 15 19 background #00000000ffff
 15 19 background-alpha 21626
 range 19 20
 range 20 24
-20 24 scale  1.200000
+20 24 scale 1.200000
 20 24 stretch normal
 20 24 background #00000000ffff
 20 24 background-alpha 21626
 range 24 25
 range 25 29
-25 29 scale  1.440000
+25 29 scale 1.440000
 25 29 stretch semi-expanded
 25 29 background #00000000ffff
 25 29 background-alpha 43690
 range 29 30
 range 30 34
-30 34 scale  1.728000
+30 34 scale 1.728000
 30 34 stretch expanded
 range 34 35
 range 35 39
-35 39 scale  1.728000
+35 39 scale 1.728000
 35 39 stretch extra-expanded
 range 39 40
 range 40 44
-40 44 scale  1.728000
+40 44 scale 1.728000
 40 44 stretch ultra-expanded
 range 44 2147483647
 


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