summaryrefslogtreecommitdiff
path: root/util/cairo-script
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2009-06-06 20:09:15 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2009-06-06 20:10:49 +0100
commit16eb160c7794ad34c17c5b12ec586d956baf9831 (patch)
treefc2bf49d7379b57ecfa70b3307f8abca561cc0ed /util/cairo-script
parentd753ba96aba4dbbcbd0da1823be8824ba233f079 (diff)
downloadcairo-16eb160c7794ad34c17c5b12ec586d956baf9831.tar.gz
[script] Enable compilation without fontconfig
Some insane people actually try compiling cairo with freetype and without fontconfig...
Diffstat (limited to 'util/cairo-script')
-rw-r--r--util/cairo-script/cairo-script-operators.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/util/cairo-script/cairo-script-operators.c b/util/cairo-script/cairo-script-operators.c
index b8ff7117c..51666652c 100644
--- a/util/cairo-script/cairo-script-operators.c
+++ b/util/cairo-script/cairo-script-operators.c
@@ -1621,6 +1621,7 @@ _ft_create_for_pattern (csi_t *ctx,
csi_string_t *string,
cairo_font_face_t **font_face_out)
{
+#if CAIRO_HAS_FC_FONT
csi_blob_t tmpl;
struct _ft_face_data *data;
csi_list_t *link;
@@ -1666,6 +1667,11 @@ _ft_create_for_pattern (csi_t *ctx,
data->font_face = font_face;
*font_face_out = font_face;
return CSI_STATUS_SUCCESS;
+#else
+ if (--string->base.ref == 0)
+ csi_string_free (ctx, string);
+ return CSI_INT_STATUS_UNSUPPORTED;
+#endif
}
static csi_status_t