summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2008-12-17 23:45:39 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2008-12-18 12:06:35 +0000
commit0df43251d4b4641d16c0a2e2c49d18dd2a9c832e (patch)
treefa44ef5a013c78e4823b48beb67bda3a3b6883a5 /util
parent97a00bdd4eefade8d0808b5572bcdbba26c9c8f3 (diff)
[replay] Take advantage of unresolved fonts
As Behdad has changed the underlying ft-font to accept unresolved patterns, take advantage of that to simplify the replay code.
Diffstat (limited to 'util')
-rw-r--r--util/cairo-script/cairo-script-operators.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/util/cairo-script/cairo-script-operators.c b/util/cairo-script/cairo-script-operators.c
index b97d9368..28e449e8 100644
--- a/util/cairo-script/cairo-script-operators.c
+++ b/util/cairo-script/cairo-script-operators.c
@@ -1628,8 +1628,7 @@ _ft_create_for_pattern (csi_t *ctx,
struct _ft_face_data *data;
csi_list_t *link;
cairo_font_face_t *font_face;
- FcPattern *pattern, *resolved;
- FcResult result;
+ FcPattern *pattern;
csi_status_t status;
_csi_blob_init (&tmpl, (uint8_t *) string->string, string->len);
@@ -1646,18 +1645,7 @@ _ft_create_for_pattern (csi_t *ctx,
if (_csi_unlikely (pattern == NULL))
return _csi_error (CSI_STATUS_NO_MEMORY);
- FcConfigSubstitute (NULL, pattern, FcMatchPattern);
- FcDefaultSubstitute (pattern);
-
- resolved = FcFontMatch (NULL, pattern, &result);
- if (_csi_unlikely (resolved == NULL)) {
- FcPatternDestroy (pattern);
- return _csi_error (CSI_STATUS_NO_MEMORY);
- }
-
- font_face = cairo_ft_font_face_create_for_pattern (resolved);
-
- FcPatternDestroy (resolved);
+ font_face = cairo_ft_font_face_create_for_pattern (pattern);
FcPatternDestroy (pattern);
data = _csi_slab_alloc (ctx, sizeof (*data));