xref: /plan9/sys/src/cmd/gs/src/gdevpdtw.h (revision 593dc095aefb2a85c828727bbfa9da139a49bdf4)
1 /* Copyright (C) 2002 Aladdin Enterprises.  All rights reserved.
2 
3   This software is provided AS-IS with no warranty, either express or
4   implied.
5 
6   This software is distributed under license and may not be copied,
7   modified or distributed except as expressly authorized under the terms
8   of the license contained in the file LICENSE in this distribution.
9 
10   For more information about licensing, please refer to
11   http://www.ghostscript.com/licensing/. For information on
12   commercial licensing, go to http://www.artifex.com/licensing/ or
13   contact Artifex Software, Inc., 101 Lucas Valley Road #110,
14   San Rafael, CA  94903, U.S.A., +1(415)492-9861.
15 */
16 
17 /* $Id: gdevpdtw.h,v 1.6 2005/04/04 08:53:07 igor Exp $ */
18 /* Font and CMap resource writing API for pdfwrite */
19 
20 #ifndef gdevpdtw_INCLUDED
21 #  define gdevpdtw_INCLUDED
22 
23 /*
24  * The procedures declared here are called only from gdevpdtf.c: they are
25  * not intended to be called from anywhere else.
26  */
27 
28 /* ---------------- Font resource writing ---------------- */
29 
30 /*
31  * Each of these procedures is referenced only from a single place in
32  * gdevpdtf.c.  Their prototype and functionality must match the definition
33  * of pdf_font_write_contents_proc_t in gdevpdtf.h.
34  */
35 int
36   pdf_write_contents_type0(gx_device_pdf *pdev, pdf_font_resource_t *pdfont),
37   pdf_finish_write_contents_type3(gx_device_pdf *pdev,
38 				  pdf_font_resource_t *pdfont),
39   pdf_write_contents_std(gx_device_pdf *pdev, pdf_font_resource_t *pdfont),
40   pdf_write_contents_simple(gx_device_pdf *pdev, pdf_font_resource_t *pdfont),
41   pdf_write_contents_cid0(gx_device_pdf *pdev, pdf_font_resource_t *pdfont),
42   pdf_write_contents_cid2(gx_device_pdf *pdev, pdf_font_resource_t *pdfont),
43   pdf_different_encoding_index(const pdf_font_resource_t *pdfont, int ch0),
44   pdf_write_encoding(gx_device_pdf *pdev, const pdf_font_resource_t *pdfont, long id, int ch),
45   pdf_write_encoding_ref(gx_device_pdf *pdev, const pdf_font_resource_t *pdfont, long id);
46 
47 
48 /* ---------------- CMap resource writing ---------------- */
49 
50 #ifndef gs_cid_system_info_DEFINED
51 #  define gs_cid_system_info_DEFINED
52 typedef struct gs_cid_system_info_s gs_cid_system_info_t;
53 #endif
54 #ifndef gs_cmap_DEFINED
55 #  define gs_cmap_DEFINED
56 typedef struct gs_cmap_s gs_cmap_t;
57 #endif
58 
59 /*
60  * Write the CIDSystemInfo for a CIDFont or a CMap.
61  */
62 int pdf_write_cid_system_info(gx_device_pdf *pdev,
63 			      const gs_cid_system_info_t *pcidsi, gs_id object_id);
64 
65 /*
66  * Write a CMap resource.  We pass the CMap object as well as the resource,
67  * because we write CMaps when they are created.
68  */
69 int pdf_write_cmap(gx_device_pdf *pdev, const gs_cmap_t *pcmap,
70 		   pdf_resource_t **ppres, int font_index_only);
71 
72 #endif /* gdevpdtw_INCLUDED */
73