[cairo-commit] util/cairo-script
Behdad Esfahbod
behdad at kemper.freedesktop.org
Mon Jul 14 12:55:20 PDT 2014
util/cairo-script/cairo-script-operators.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
New commits:
commit f4dbba26d4fc571e0621f3c7a98196c501f8bcc5
Author: Behdad Esfahbod <behdad at 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);
More information about the cairo-commit
mailing list