summaryrefslogtreecommitdiff
path: root/src/cairo-ps-surface.c
diff options
context:
space:
mode:
authorAdrian Johnson <ajohnson@redneon.com>2006-08-02 19:12:51 -0400
committerKristian Høgsberg <krh@redhat.com>2006-08-02 19:30:55 -0400
commita0989f427be87c60415963dd6822b3c5c3781691 (patch)
tree759da69de74fb332c350809b4e43457375ed2dd6 /src/cairo-ps-surface.c
parentc05dd48ac1afe0e4f3ec0c24797a9fbc3f98ce85 (diff)
Remove freetype dependency for truetype subsetting code.
Add a load_truetype_table function to cairo_scaled_font_backend_t and use it to load the truetype sfnt tables. Implement this with freetype for the freetype font backend and use GetFontData for win32. Atsui remains unimplemented, and still falls back to type3 fonts.
Diffstat (limited to 'src/cairo-ps-surface.c')
-rw-r--r--src/cairo-ps-surface.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/cairo-ps-surface.c b/src/cairo-ps-surface.c
index 59d8db050..6467501a1 100644
--- a/src/cairo-ps-surface.c
+++ b/src/cairo-ps-surface.c
@@ -43,9 +43,9 @@
#include "cairo-scaled-font-subsets-private.h"
#include "cairo-paginated-surface-private.h"
#include "cairo-meta-surface-private.h"
-#include "cairo-ft-private.h"
#include "cairo-output-stream-private.h"
+#include <ctype.h>
#include <time.h>
#include <zlib.h>
@@ -385,6 +385,7 @@ _cairo_ps_surface_emit_header (cairo_ps_surface_t *surface)
}
}
+#if CAIRO_HAS_FT_FONT
static cairo_status_t
_cairo_ps_surface_emit_type1_font_subset (cairo_ps_surface_t *surface,
cairo_scaled_font_subset_t *font_subset)
@@ -414,6 +415,7 @@ _cairo_ps_surface_emit_type1_font_subset (cairo_ps_surface_t *surface,
return CAIRO_STATUS_SUCCESS;
}
+#endif
static cairo_status_t
_cairo_ps_surface_emit_truetype_font_subset (cairo_ps_surface_t *surface,
@@ -674,9 +676,11 @@ _cairo_ps_surface_emit_font_subset (cairo_scaled_font_subset_t *font_subset,
cairo_ps_surface_t *surface = closure;
cairo_status_t status;
+#if CAIRO_HAS_FT_FONT
status = _cairo_ps_surface_emit_type1_font_subset (surface, font_subset);
if (status != CAIRO_INT_STATUS_UNSUPPORTED)
return;
+#endif
status = _cairo_ps_surface_emit_truetype_font_subset (surface, font_subset);
if (status != CAIRO_INT_STATUS_UNSUPPORTED)