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
64
65
66
67
68
69
70
71
72
73
74
75
76
|
/* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks.
Copyright (C) 2002-2018 by Jin-Hwan Cho and Shunsaku Hirata,
the dvipdfmx project team.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
#ifndef _TT_CMAP_H_
#define _TT_CMAP_H_
#include "sfnt.h"
/* TrueType cmap table */
typedef struct
{
USHORT format;
USHORT platform;
USHORT encoding;
ULONG language; /* or version, only for Mac */
void *map;
} tt_cmap;
/* Paltform ID */
#define TT_MAC 1u
#define TT_WIN 3u
/* Platform-specific encoding ID */
/* Windows */
#define TT_WIN_SYMBOL 0u
#define TT_WIN_UNICODE 1u
#define TT_WIN_SJIS 2u
#define TT_WIN_RPC 3u
#define TT_WIN_BIG5 4u
#define TT_WIN_WANSUNG 5u
#define TT_WIN_JOHAB 6u
#define TT_WIN_UCS4 10u
/* Mac */
#define TT_MAC_ROMAN 0u
#define TT_MAC_JAPANESE 1u
#define TT_MAC_TRADITIONAL_CHINESE 2u
#define TT_MAC_KOREAN 3u
#define TT_MAC_SIMPLIFIED_CHINESE 25u
extern tt_cmap *tt_cmap_read (sfnt *sfont, USHORT platform, USHORT encoding);
extern USHORT tt_cmap_lookup (tt_cmap *cmap, ULONG cc);
extern void tt_cmap_release (tt_cmap *cmap);
#include "pdfobj.h"
/* Indirect reference */
extern pdf_obj *otf_create_ToUnicode_stream (const char *map_name,
int ttc_index,
const char *basefont,
const char *used_chars);
/* CMap ID */
extern int otf_load_Unicode_CMap (const char *map_name,
int ttc_index,
const char *otl_opts, int wmode);
extern int otf_try_load_GID_to_CID_map (const char *map_name, int ttc_index, int wmode);
#endif /* _TT_CMAP_H_ */
|