summaryrefslogtreecommitdiff
path: root/src/cairo-cff-subset.c
diff options
context:
space:
mode:
authorAdrian Johnson <ajohnson@redneon.com>2010-11-22 22:46:54 +1030
committerAdrian Johnson <ajohnson@redneon.com>2010-11-23 00:13:24 +1030
commit7f0029c31e15dfd34f57bdeca18f27e9e7b8f9aa (patch)
tree938c9f43154eb1d43f7c0ffdaf2e1aba51fac0b1 /src/cairo-cff-subset.c
parent9862c38fc71c6dcd444da3b079e5404cd14594c3 (diff)
downloadcairo-7f0029c31e15dfd34f57bdeca18f27e9e7b8f9aa.tar.gz
Use fallback font for synthetic fonts
If the font has been synthesized we can't use the native subsetters as the outlines won't be the same. Instead force the use of the fallback subsetters so the synthesized outlines will used to generate the font.
Diffstat (limited to 'src/cairo-cff-subset.c')
-rw-r--r--src/cairo-cff-subset.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/cairo-cff-subset.c b/src/cairo-cff-subset.c
index f2ec37426..a01d55eb5 100644
--- a/src/cairo-cff-subset.c
+++ b/src/cairo-cff-subset.c
@@ -1906,6 +1906,10 @@ _cairo_cff_font_create (cairo_scaled_font_subset_t *scaled_font_subset,
if (!backend->load_truetype_table)
return CAIRO_INT_STATUS_UNSUPPORTED;
+ /* We need to use a fallback font generated from the synthesized outlines. */
+ if (backend->is_synthetic (scaled_font_subset->scaled_font))
+ return CAIRO_INT_STATUS_UNSUPPORTED;
+
data_length = 0;
status = backend->load_truetype_table( scaled_font_subset->scaled_font,
TT_TAG_CFF, 0, NULL, &data_length);