diff options
author | Behdad Esfahbod <behdad@behdad.org> | 2014-07-11 11:05:43 -0400 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2014-07-11 11:07:25 -0400 |
commit | 312553af298692111928a9443b75a00bf46d2adb (patch) | |
tree | be2be5acf7c324182e4793bd4c9b8d8e3b1bfed6 /util | |
parent | 4cb220773d4babe216afae1198bb192956ffeae9 (diff) |
[trace] Don't print FC_CHARSET, FC_LANG, and FC_CAPABILITY
There are many more that can go, but these take the most bytes.
FC_CHARSET needs to go specially because I recently changed
its format in fontconfig. Ouch!
Diffstat (limited to 'util')
-rw-r--r-- | util/cairo-trace/trace.c | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/util/cairo-trace/trace.c b/util/cairo-trace/trace.c index dc121235a..4d3482646 100644 --- a/util/cairo-trace/trace.c +++ b/util/cairo-trace/trace.c @@ -4331,13 +4331,24 @@ cairo_ft_font_face_create_for_pattern (FcPattern *pattern) obj = _get_object (FONT_FACE, ret); if (obj->unknown) { - FcChar8 *parsed; + FcPattern *copy; + FcChar8 *unparsed; - parsed = DLCALL (FcNameUnparse, pattern); + copy = DLCALL (FcPatternDuplicate, pattern); + if (copy) + { + DLCALL (FcPatternDel, copy, FC_LANG); + DLCALL (FcPatternDel, copy, FC_CHARSET); + DLCALL (FcPatternDel, copy, FC_CAPABILITY); + } + else + copy = pattern; + + unparsed = DLCALL (FcNameUnparse, copy); _trace_printf ("dict\n" " /type 42 set\n" " /pattern "); - _emit_string_literal ((char *) parsed, -1); + _emit_string_literal ((char *) unparsed, -1); _trace_printf (" set\n" " font %% f%ld\n", font_face_id); @@ -4345,7 +4356,9 @@ cairo_ft_font_face_create_for_pattern (FcPattern *pattern) _push_operand (FONT_FACE, ret); dump_stack(__func__); - free (parsed); + if (copy != pattern) + DLCALL (FcPatternDestroy, copy); + free (unparsed); } _write_unlock (); } |