~ubuntu-branches/ubuntu/jaunty/ghostscript/jaunty-updates

« back to all changes in this revision

Viewing changes to src/gxfcid.h

  • Committer: Bazaar Package Importer
  • Author(s): Till Kamppeter
  • Date: 2009-01-20 16:40:45 UTC
  • mfrom: (1.1.10 upstream)
  • Revision ID: james.westby@ubuntu.com-20090120164045-lnfhi0n30o5lwhwa
Tags: 8.64.dfsg.1~svn9377-0ubuntu1
* New upstream release (SVN rev 9377)
   o Fixes many bugs concerning PDF rendering, to make the PDF printing
     workflow correctly working.
   o Fixes long-standing bugs in many drivers, like input paper tray and
     duplex options not working for the built-in PCL 4, 5, 5c, 5e, and
     6/XL drivers, PDF input not working for bjc600, bjc800, and cups
     output devices, several options not working and uninitialized
     memory with cups output device.
   o Merged nearly all patches of the Ubuntu and Debian packages upstream.
   o Fixes LP: #317810, LP: #314439, LP: #314018.
* debian/patches/03_libpaper_support.dpatch,
  debian/patches/11_gs-cjk_font_glyph_handling_fix.dpatch,
  debian/patches/12_gs-cjk_vertical_writing_metrics_fix.dpatch,
  debian/patches/13_gs-cjk_cjkps_examples.dpatch,
  debian/patches/20_bbox_segv_fix.dpatch,
  debian/patches/21_brother_7x0_gdi_fix.dpatch,
  debian/patches/22_epsn_margin_workaround.dpatch,
  debian/patches/24_gs_man_fix.dpatch,
  debian/patches/25_toolbin_insecure_tmp_usage_fix.dpatch,
  debian/patches/26_assorted_script_fixes.dpatch,
  debian/patches/29_gs_css_fix.dpatch,
  debian/patches/30_ps2pdf_man_improvement.dpatch,
  debian/patches/31_fix-gc-sigbus.dpatch,
  debian/patches/34_ftbfs-on-hurd-fix.dpatch,
  debian/patches/35_disable_libcairo.dpatch,
  debian/patches/38_pxl-duplex.dpatch,
  debian/patches/39_pxl-resolution.dpatch,
  debian/patches/42_gs-init-ps-delaybind-fix.dpatch,
  debian/patches/45_bjc600-bjc800-pdf-input.dpatch,
  debian/patches/48_cups-output-device-pdf-duplex-uninitialized-memory-fix.dpatch,
  debian/patches/50_lips4-floating-point-exception.dpatch,
  debian/patches/52_cups-device-logging.dpatch,
  debian/patches/55_pcl-input-slot-fix.dpatch,
  debian/patches/57_pxl-input-slot-fix.dpatch,
  debian/patches/60_pxl-cups-driver-pdf.dpatch,
  debian/patches/62_onebitcmyk-pdf.dpatch,
  debian/patches/65_too-big-temp-files-1.dpatch,
  debian/patches/67_too-big-temp-files-2.dpatch,
  debian/patches/70_take-into-account-data-in-stream-buffer-before-refill.dpatch:
  Removed, applied upstream.
* debian/patches/01_docdir_fix_for_debian.dpatch,
  debian/patches/02_gs_man_fix_debian.dpatch,
  debian/patches/01_docdir-fix-for-debian.dpatch,
  debian/patches/02_docdir-fix-for-debian.dpatch: Renamed patches to
  make merging with Debian easier.
* debian/patches/32_improve-handling-of-media-size-changes-from-gv.dpatch, 
  debian/patches/33_bad-params-to-xinitimage-on-large-bitmaps.dpatch:
  regenerated for new source directory structure.
* debian/rules: Corrected paths to remove cidfmap (it is in Resource/Init/
  in GS 8.64) and to install headers (source paths are psi/ and base/ now).
* debian/rules: Remove all fontmaps, as DeFoMa replaces them.
* debian/local/pdftoraster/pdftoraster.c,
  debian/local/pdftoraster/pdftoraster.convs, debian/rules: Removed
  added pdftoraster filter and use the one which comes with Ghostscript.
* debian/ghostscript.links: s/8.63/8.64/

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Copyright (C) 2001-2006 Artifex Software, Inc.
2
 
   All Rights Reserved.
3
 
  
4
 
   This software is provided AS-IS with no warranty, either express or
5
 
   implied.
6
 
 
7
 
   This software is distributed under license and may not be copied, modified
8
 
   or distributed except as expressly authorized under the terms of that
9
 
   license.  Refer to licensing information at http://www.artifex.com/
10
 
   or contact Artifex Software, Inc.,  7 Mt. Lassen Drive - Suite A-134,
11
 
   San Rafael, CA  94903, U.S.A., +1(415)492-9861, for further information.
12
 
*/
13
 
 
14
 
/* $Id: gxfcid.h 8022 2007-06-05 22:23:38Z giles $ */
15
 
/* Definitions for CID-keyed fonts */
16
 
 
17
 
#ifndef gxfcid_INCLUDED
18
 
#  define gxfcid_INCLUDED
19
 
 
20
 
#include "gxcid.h"              /* for CIDSystemInfo */
21
 
#include "gxfont.h"
22
 
#include "gxfont42.h"
23
 
 
24
 
/* ---------------- Structures ---------------- */
25
 
 
26
 
/*
27
 
 * Define the data common to CIDFontType 0 (FontType 9, analogous to 1)
28
 
 * and 2 (FontType 11, analogous to 42).
29
 
 */
30
 
#define MAX_GDBytes 4
31
 
typedef struct gs_font_cid_data_s {
32
 
    gs_cid_system_info_t CIDSystemInfo;
33
 
    int CIDCount;
34
 
    int GDBytes;                /* optional, for standard glyph_data */
35
 
    /*int PaintType;*/
36
 
    /*float StrokeWidth;*/
37
 
} gs_font_cid_data;
38
 
 
39
 
extern_st(st_gs_font_cid_data);
40
 
#define public_st_gs_font_cid_data()    /* in gsfcid.c */\
41
 
  gs_public_st_suffix_add0_final(st_gs_font_cid_data,\
42
 
    gs_font_cid_data, "gs_font_cid_data",\
43
 
    font_cid_data_enum_ptrs, font_cid_data_reloc_ptrs,\
44
 
    gs_font_finalize, st_cid_system_info)
45
 
#define st_gs_font_cid_data_num_ptrs\
46
 
  st_cid_system_info_num_ptrs
47
 
 
48
 
/*
49
 
 * Define the structures for CIDFontType 0, 1, and 2 fonts.  In principle,
50
 
 * each of these should be in its own header file, but they're so small
51
 
 * that we include them here.
52
 
 */
53
 
 
54
 
/* CIDFontType 0 references an array of (partial) FontType 1 fonts. */
55
 
 
56
 
#ifndef gs_font_type1_DEFINED
57
 
#  define gs_font_type1_DEFINED
58
 
typedef struct gs_font_type1_s gs_font_type1;
59
 
#endif
60
 
 
61
 
#ifndef gs_font_cid0_DEFINED
62
 
#  define gs_font_cid0_DEFINED
63
 
typedef struct gs_font_cid0_s gs_font_cid0;
64
 
#endif
65
 
 
66
 
#define MAX_FDBytes 4
67
 
typedef struct gs_font_cid0_data_s {
68
 
    gs_font_cid_data common;
69
 
    ulong CIDMapOffset;         /* optional, for standard glyph_data */
70
 
    gs_font_type1 **FDArray;
71
 
    uint FDArray_size;
72
 
    int FDBytes;                /* optional, for standard glyph_data */
73
 
    /*
74
 
     * The third argument of glyph_data may be NULL if only the font number
75
 
     * is wanted.
76
 
     */
77
 
    int (*glyph_data)(gs_font_base *, gs_glyph, gs_glyph_data_t *, int *);
78
 
    void *proc_data;
79
 
} gs_font_cid0_data;
80
 
struct gs_font_cid0_s {
81
 
    gs_font_base_common;
82
 
    gs_font_cid0_data cidata;
83
 
};
84
 
 
85
 
extern_st(st_gs_font_cid0);
86
 
#define public_st_gs_font_cid0() /* in gsfcid.c */\
87
 
  gs_public_st_composite_use_final(st_gs_font_cid0,\
88
 
    gs_font_cid0, "gs_font_cid0",\
89
 
    font_cid0_enum_ptrs, font_cid0_reloc_ptrs, gs_font_finalize)
90
 
#define st_gs_font_cid0_max_ptrs\
91
 
  (st_gs_font_max_ptrs + st_gs_font_cid_data_num_ptrs + 2)
92
 
 
93
 
/* Define a GC descriptor for allocating FDArray. */
94
 
extern_st(st_gs_font_type1_ptr_element); /* in gsfcid.c */
95
 
 
96
 
/* CIDFontType 1 doesn't reference any additional structures. */
97
 
 
98
 
typedef struct gs_font_cid1_data_s {
99
 
    gs_cid_system_info_t CIDSystemInfo;
100
 
} gs_font_cid1_data;
101
 
typedef struct gs_font_cid1_s {
102
 
    gs_font_base_common;
103
 
    gs_font_cid1_data cidata;
104
 
} gs_font_cid1;
105
 
 
106
 
extern_st(st_gs_font_cid1);
107
 
#define public_st_gs_font_cid1() /* in gsfcid.c */\
108
 
  gs_public_st_composite_use_final(st_gs_font_cid1,\
109
 
    gs_font_cid1, "gs_font_cid1",\
110
 
    font_cid1_enum_ptrs, font_cid1_reloc_ptrs, gs_font_finalize)
111
 
#define st_gs_font_cid1_max_ptrs\
112
 
  (st_gs_font_max_ptrs + st_cid_system_info_num_ptrs)
113
 
 
114
 
/* CIDFontType 2 is a subclass of FontType 42. */
115
 
 
116
 
#ifndef gs_font_cid2_DEFINED
117
 
#  define gs_font_cid2_DEFINED
118
 
typedef struct gs_font_cid2_s gs_font_cid2;
119
 
#endif
120
 
typedef struct gs_font_cid2_data_s {
121
 
    gs_font_cid_data common;
122
 
    int MetricsCount;
123
 
    int (*CIDMap_proc)(gs_font_cid2 *, gs_glyph);
124
 
    /*
125
 
     * "Wrapper" get_outline and glyph_info procedures are needed, to
126
 
     * handle MetricsCount.  Save the original ones here.
127
 
     */
128
 
    struct o_ {
129
 
        int (*get_outline)(gs_font_type42 *, uint, gs_glyph_data_t *);
130
 
        int (*get_metrics)(gs_font_type42 *, uint, gs_type42_metrics_options_t, 
131
 
                float * /* See comment for gs_type42_default_get_metrics. */);
132
 
    } orig_procs;
133
 
} gs_font_cid2_data;
134
 
struct gs_font_cid2_s {
135
 
    gs_font_type42_common;
136
 
    gs_font_cid2_data cidata;
137
 
};
138
 
 
139
 
extern_st(st_gs_font_cid2);
140
 
#define public_st_gs_font_cid2() /* in gsfcid.c */\
141
 
  gs_public_st_composite_use_final(st_gs_font_cid2,\
142
 
    gs_font_cid2, "gs_font_cid2",\
143
 
    font_cid2_enum_ptrs, font_cid2_reloc_ptrs, gs_font_finalize)
144
 
#define st_gs_font_cid2_max_ptrs\
145
 
  (st_gs_font_type42_max_ptrs + st_gs_font_cid_data_num_ptrs)
146
 
 
147
 
/* ---------------- Procedures ---------------- */
148
 
 
149
 
/*
150
 
 * Get the CIDSystemInfo of a font.  If the font is not a CIDFont,
151
 
 * return NULL.
152
 
 */
153
 
const gs_cid_system_info_t *gs_font_cid_system_info(const gs_font *);
154
 
 
155
 
/*
156
 
 * Provide a default enumerate_glyph procedure for CIDFontType 0 fonts.
157
 
 * Built for simplicity, not for speed.
158
 
 */
159
 
font_proc_enumerate_glyph(gs_font_cid0_enumerate_glyph);
160
 
 
161
 
/*
162
 
 * Check CIDSystemInfo compatibility.
163
 
 */
164
 
bool gs_is_CIDSystemInfo_compatible(const gs_cid_system_info_t *info0, 
165
 
                                    const gs_cid_system_info_t *info1);
166
 
 
167
 
/* Return the font from the FDArray at the given index */
168
 
const gs_font *gs_cid0_indexed_font(const gs_font *, int);
169
 
 
170
 
/* Check whether a CID font has a Type 2 subfont. */
171
 
bool gs_cid0_has_type2(const gs_font *font);
172
 
 
173
 
#endif /* gxfcid_INCLUDED */