1 /* -*- Mode: c; c-basic-offset: 4; indent-tabs-mode: t; tab-width: 8; -*- */
2 /* cairo - a vector graphics library with display and print output
4 * Copyright © 2008 Adrian Johnson
6 * This library is free software; you can redistribute it and/or
7 * modify it either under the terms of the GNU Lesser General Public
8 * License version 2.1 as published by the Free Software Foundation
9 * (the "LGPL") or, at your option, under the terms of the Mozilla
10 * Public License Version 1.1 (the "MPL"). If you do not alter this
11 * notice, a recipient may use your version of this file under either
12 * the MPL or the LGPL.
14 * You should have received a copy of the LGPL along with this library
15 * in the file COPYING-LGPL-2.1; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA
17 * You should have received a copy of the MPL along with this library
18 * in the file COPYING-MPL-1.1
20 * The contents of this file are subject to the Mozilla Public License
21 * Version 1.1 (the "License"); you may not use this file except in
22 * compliance with the License. You may obtain a copy of the License at
23 * http://www.mozilla.org/MPL/
25 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY
26 * OF ANY KIND, either express or implied. See the LGPL or the MPL for
27 * the specific language governing rights and limitations.
29 * The Original Code is the cairo graphics library.
31 * The Initial Developer of the Original Code is Adrian Johnson.
34 * Adrian Johnson <ajohnson@redneon.com>
37 #ifndef CAIRO_TYPE3_GLYPH_SURFACE_PRIVATE_H
38 #define CAIRO_TYPE3_GLYPH_SURFACE_PRIVATE_H
42 #if CAIRO_HAS_FONT_SUBSET
44 #include "cairo-surface-private.h"
45 #include "cairo-surface-clipper-private.h"
46 #include "cairo-pdf-operators-private.h"
48 typedef cairo_status_t (*cairo_type3_glyph_surface_emit_image_t) (cairo_image_surface_t *image,
49 cairo_output_stream_t *stream);
51 typedef struct cairo_type3_glyph_surface {
54 cairo_scaled_font_t *scaled_font;
55 cairo_output_stream_t *stream;
56 cairo_pdf_operators_t pdf_operators;
57 cairo_matrix_t cairo_to_pdf;
58 cairo_type3_glyph_surface_emit_image_t emit_image;
60 cairo_surface_clipper_t clipper;
61 } cairo_type3_glyph_surface_t;
63 cairo_private cairo_surface_t *
64 _cairo_type3_glyph_surface_create (cairo_scaled_font_t *scaled_font,
65 cairo_output_stream_t *stream,
66 cairo_type3_glyph_surface_emit_image_t emit_image,
67 cairo_scaled_font_subsets_t *font_subsets);
70 _cairo_type3_glyph_surface_set_font_subsets_callback (void *abstract_surface,
71 cairo_pdf_operators_use_font_subset_t use_font_subset,
74 cairo_private cairo_status_t
75 _cairo_type3_glyph_surface_analyze_glyph (void *abstract_surface,
76 unsigned long glyph_index);
78 cairo_private cairo_status_t
79 _cairo_type3_glyph_surface_emit_glyph (void *abstract_surface,
80 cairo_output_stream_t *stream,
81 unsigned long glyph_index,
85 #endif /* CAIRO_HAS_FONT_SUBSET */
87 #endif /* CAIRO_TYPE3_GLYPH_SURFACE_PRIVATE_H */