Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | RSS feed

  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
  3.  *
  4.  * Copyright © 2008 Adrian Johnson
  5.  *
  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.
  13.  *
  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
  19.  *
  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/
  24.  *
  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.
  28.  *
  29.  * The Original Code is the cairo graphics library.
  30.  *
  31.  * The Initial Developer of the Original Code is Adrian Johnson.
  32.  *
  33.  * Contributor(s):
  34.  *      Adrian Johnson <ajohnson@redneon.com>
  35.  */
  36.  
  37. #ifndef CAIRO_TYPE3_GLYPH_SURFACE_PRIVATE_H
  38. #define CAIRO_TYPE3_GLYPH_SURFACE_PRIVATE_H
  39.  
  40. #include "cairoint.h"
  41.  
  42. #if CAIRO_HAS_FONT_SUBSET
  43.  
  44. #include "cairo-surface-private.h"
  45. #include "cairo-surface-clipper-private.h"
  46. #include "cairo-pdf-operators-private.h"
  47.  
  48. typedef cairo_int_status_t
  49. (*cairo_type3_glyph_surface_emit_image_t) (cairo_image_surface_t *image,
  50.                                            cairo_output_stream_t        *stream);
  51.  
  52. typedef struct cairo_type3_glyph_surface {
  53.     cairo_surface_t base;
  54.  
  55.     cairo_scaled_font_t *scaled_font;
  56.     cairo_output_stream_t *stream;
  57.     cairo_pdf_operators_t pdf_operators;
  58.     cairo_matrix_t cairo_to_pdf;
  59.     cairo_type3_glyph_surface_emit_image_t emit_image;
  60.  
  61.     cairo_surface_clipper_t clipper;
  62. } cairo_type3_glyph_surface_t;
  63.  
  64. cairo_private cairo_surface_t *
  65. _cairo_type3_glyph_surface_create (cairo_scaled_font_t                   *scaled_font,
  66.                                    cairo_output_stream_t                 *stream,
  67.                                    cairo_type3_glyph_surface_emit_image_t emit_image,
  68.                                    cairo_scaled_font_subsets_t           *font_subsets);
  69.  
  70. cairo_private void
  71. _cairo_type3_glyph_surface_set_font_subsets_callback (void                                  *abstract_surface,
  72.                                                       cairo_pdf_operators_use_font_subset_t  use_font_subset,
  73.                                                       void                                  *closure);
  74.  
  75. cairo_private cairo_status_t
  76. _cairo_type3_glyph_surface_analyze_glyph (void               *abstract_surface,
  77.                                           unsigned long       glyph_index);
  78.  
  79. cairo_private cairo_status_t
  80. _cairo_type3_glyph_surface_emit_glyph (void                  *abstract_surface,
  81.                                        cairo_output_stream_t *stream,
  82.                                        unsigned long          glyph_index,
  83.                                        cairo_box_t           *bbox,
  84.                                        double                *width);
  85.  
  86. #endif /* CAIRO_HAS_FONT_SUBSET */
  87.  
  88. #endif /* CAIRO_TYPE3_GLYPH_SURFACE_PRIVATE_H */
  89.