summaryrefslogtreecommitdiff
path: root/src/pdflib/font/ft_cid.h
blob: db3d5d9b26adfc413b49d225915cdd94365b0888 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/*---------------------------------------------------------------------------*
 |              PDFlib - A library for generating PDF on the fly             |
 +---------------------------------------------------------------------------+
 | Copyright (c) 1997-2006 Thomas Merz and PDFlib GmbH. All rights reserved. |
 +---------------------------------------------------------------------------+
 |                                                                           |
 |    This software is subject to the PDFlib license. It is NOT in the       |
 |    public domain. Extended versions and commercial licenses are           |
 |    available, please check http://www.pdflib.com.                         |
 |                                                                           |
 *---------------------------------------------------------------------------*/

/* $Id: ft_cid.h,v 1.2 2009/10/20 18:12:26 scuri Exp $
 *
 * CID data structures
 *
 */

#ifndef FT_CID_H
#define FT_CID_H

typedef struct fnt_cmap_s fnt_cmap;
typedef struct fnt_cmap_info_s fnt_cmap_info;
typedef struct fnt_cmap_stack_s fnt_cmap_stack;

#define FNT_MAXCID 30000     /* actual maximal CID */

#define FNT_CIDMETRIC_INCR 5 /* increment of table fnt_cid_width_arrays */

#define FNT_MAX_ILLBYTES 8   /* maximal number of illegal bytes */


/* Predefined CMap info */
struct fnt_cmap_info_s
{
    const char *name;           /* CMap name */
    int charcoll;               /* character collection */
    short codesize;             /* =0: not UTF-16, =2: UTF-16, -2: HW UTF-16 */
    short compatibility;        /* PDF version */
    short supplement13;         /* supplement for PDF 1.3 */
    short supplement14;         /* supplement for PDF 1.4 */
    short supplement15;         /* supplement for PDF 1.5 */
    short supplement16;         /* supplement for PDF 1.6 */
    short vertical;             /* =1: vertical, =0: horizontal */
};

/* internal CMap types */
typedef enum
{
    cmap_code2cid,
    cmap_cid2unicode,
    cmap_code2unicode
}
fnt_cmaptype;

int fnt_get_predefined_cmap_info(const char *cmapname, fnt_cmap_info *cmapinfo);
const char *fnt_get_ordering_cid(int charcoll);
int fnt_get_maxcid(int charcoll, int supplement);
int fnt_get_charcoll(const char *ordering);
int fnt_get_supplement(fnt_cmap_info *cmapinfo, int compatibility);


#endif  /* FT_CID_H */