[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cairo-commit
Subject:    [cairo-commit] util/cairo-script
From:       behdad () kemper ! freedesktop ! org (Behdad Esfahbod)
Date:       2014-07-14 19:55:20
Message-ID: 20140714195520.DD609760AE () kemper ! freedesktop ! org
[Download RAW message or body]

 util/cairo-script/cairo-script-operators.c |   12 ++++++++++++
 1 file changed, 12 insertions(+)

New commits:
commit f4dbba26d4fc571e0621f3c7a98196c501f8bcc5
Author: Behdad Esfahbod <behdad@behdad.org>
Date:   Mon Jul 14 15:54:38 2014 -0400

    [cairo-trace] Work around fontconfig :charset= parse format change
    
    As dicussed on the mailing list.

diff --git a/util/cairo-script/cairo-script-operators.c b/util/cairo-script/cairo-script-operators.c
index d4af312..0d6cafc 100644
--- a/util/cairo-script/cairo-script-operators.c
+++ b/util/cairo-script/cairo-script-operators.c
@@ -1946,6 +1946,18 @@ _ft_create_for_pattern (csi_t *ctx,
     }
 
     pattern = FcNameParse (bytes);
+    if (!pattern)
+    {
+      /* Fontconfig's representation of charset changed mid 2014;
+       * We used to record charset before that.  Remove everything
+       * after charset if that's present, and try again.  */
+      char *s = strstr ((char *) bytes, ":charset=");
+      if (s)
+      {
+	*s = '\0';
+	pattern = FcNameParse (bytes);
+      }
+    }
     if (bytes != tmpl.bytes)
 	_csi_free (ctx, bytes);
 
_______________________________________________
cairo-commit mailing list
cairo-commit@lists.cairographics.org
http://lists.cairographics.org/mailman/listinfo/cairo-commit
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic