2 |
- |
1 |
/* Copyright (C) 2003 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: ttfmemd.c,v 1.7 2004/06/24 10:10:17 igor Exp $ */
|
|
|
18 |
|
|
|
19 |
/* Memory structure descriptors for the TrueType instruction interpreter. */
|
|
|
20 |
|
|
|
21 |
#include "ttmisc.h"
|
|
|
22 |
#include "ttfoutl.h"
|
|
|
23 |
#include "ttobjs.h"
|
|
|
24 |
#include "ttfmemd.h"
|
|
|
25 |
#include "gsstruct.h"
|
|
|
26 |
|
|
|
27 |
gs_public_st_ptrs5(st_TFace, TFace, "TFace",
|
|
|
28 |
st_TFace_enum_ptrs, st_TFace_reloc_ptrs,
|
|
|
29 |
r, font, fontProgram, cvtProgram, cvt);
|
|
|
30 |
|
|
|
31 |
gs_public_st_composite(st_TInstance, TInstance,
|
|
|
32 |
"TInstance", TInstance_enum_ptrs, TInstance_reloc_ptrs);
|
|
|
33 |
|
|
|
34 |
private
|
|
|
35 |
ENUM_PTRS_BEGIN(TInstance_enum_ptrs) return 0;
|
|
|
36 |
ENUM_PTR(0, TInstance, face);
|
|
|
37 |
ENUM_PTR(1, TInstance, FDefs);
|
|
|
38 |
ENUM_PTR(2, TInstance, IDefs);
|
|
|
39 |
ENUM_PTR(3, TInstance, codeRangeTable[0].Base);
|
|
|
40 |
ENUM_PTR(4, TInstance, codeRangeTable[1].Base);
|
|
|
41 |
ENUM_PTR(5, TInstance, codeRangeTable[2].Base);
|
|
|
42 |
ENUM_PTR(6, TInstance, cvt);
|
|
|
43 |
ENUM_PTR(7, TInstance, storage);
|
|
|
44 |
ENUM_PTRS_END
|
|
|
45 |
|
|
|
46 |
private RELOC_PTRS_WITH(TInstance_reloc_ptrs, TInstance *mptr)
|
|
|
47 |
RELOC_PTR(TInstance, face);
|
|
|
48 |
RELOC_PTR(TInstance, FDefs);
|
|
|
49 |
RELOC_PTR(TInstance, IDefs);
|
|
|
50 |
RELOC_PTR(TInstance, codeRangeTable[0].Base);
|
|
|
51 |
RELOC_PTR(TInstance, codeRangeTable[1].Base);
|
|
|
52 |
RELOC_PTR(TInstance, codeRangeTable[2].Base);
|
|
|
53 |
RELOC_PTR(TInstance, cvt);
|
|
|
54 |
RELOC_PTR(TInstance, storage);
|
|
|
55 |
DISCARD(mptr);
|
|
|
56 |
RELOC_PTRS_END
|
|
|
57 |
|
|
|
58 |
gs_public_st_composite(st_TExecution_Context, TExecution_Context,
|
|
|
59 |
"TExecution_Context", TExecution_Context_enum_ptrs, TExecution_Context_reloc_ptrs);
|
|
|
60 |
|
|
|
61 |
private
|
|
|
62 |
ENUM_PTRS_BEGIN(TExecution_Context_enum_ptrs) return 0;
|
|
|
63 |
ENUM_PTR(0, TExecution_Context, current_face);
|
|
|
64 |
/* ENUM_PTR(1, TExecution_Context, code); // local, no gc invocations */
|
|
|
65 |
ENUM_PTR(1, TExecution_Context, FDefs);
|
|
|
66 |
ENUM_PTR(2, TExecution_Context, IDefs);
|
|
|
67 |
/* ENUM_PTR(4, TExecution_Context, glyphIns); // Never used. */
|
|
|
68 |
ENUM_PTR(3, TExecution_Context, callStack);
|
|
|
69 |
ENUM_PTR(4, TExecution_Context, codeRangeTable[0].Base);
|
|
|
70 |
ENUM_PTR(5, TExecution_Context, codeRangeTable[1].Base);
|
|
|
71 |
ENUM_PTR(6, TExecution_Context, codeRangeTable[2].Base);
|
|
|
72 |
ENUM_PTR(7, TExecution_Context, storage);
|
|
|
73 |
ENUM_PTR(8, TExecution_Context, stack);
|
|
|
74 |
/* zp0, // local, no gc invocations */
|
|
|
75 |
/* zp1, // local, no gc invocations */
|
|
|
76 |
/* zp2, // local, no gc invocations */
|
|
|
77 |
ENUM_PTR(9, TExecution_Context, pts.org_x);
|
|
|
78 |
ENUM_PTR(10, TExecution_Context, pts.org_y);
|
|
|
79 |
ENUM_PTR(11, TExecution_Context, pts.cur_x);
|
|
|
80 |
ENUM_PTR(12, TExecution_Context, pts.cur_y);
|
|
|
81 |
ENUM_PTR(13, TExecution_Context, pts.touch);
|
|
|
82 |
ENUM_PTR(14, TExecution_Context, pts.contours);
|
|
|
83 |
ENUM_PTR(15, TExecution_Context, twilight.org_x);
|
|
|
84 |
ENUM_PTR(16, TExecution_Context, twilight.org_y);
|
|
|
85 |
ENUM_PTR(17, TExecution_Context, twilight.cur_x);
|
|
|
86 |
ENUM_PTR(18, TExecution_Context, twilight.cur_y);
|
|
|
87 |
ENUM_PTR(19, TExecution_Context, twilight.touch);
|
|
|
88 |
ENUM_PTR(20, TExecution_Context, twilight.contours);
|
|
|
89 |
ENUM_PTR(21, TExecution_Context, cvt);
|
|
|
90 |
ENUM_PTRS_END
|
|
|
91 |
|
|
|
92 |
private RELOC_PTRS_WITH(TExecution_Context_reloc_ptrs, TExecution_Context *mptr)
|
|
|
93 |
{
|
|
|
94 |
RELOC_PTR(TExecution_Context, current_face);
|
|
|
95 |
/* RELOC_PTR(TExecution_Context, code); // local, no gc invocations */
|
|
|
96 |
RELOC_PTR(TExecution_Context, FDefs);
|
|
|
97 |
RELOC_PTR(TExecution_Context, IDefs);
|
|
|
98 |
/* RELOC_PTR(TExecution_Context, glyphIns); // Never used. */
|
|
|
99 |
RELOC_PTR(TExecution_Context, callStack);
|
|
|
100 |
RELOC_PTR(TExecution_Context, codeRangeTable[0].Base);
|
|
|
101 |
RELOC_PTR(TExecution_Context, codeRangeTable[1].Base);
|
|
|
102 |
RELOC_PTR(TExecution_Context, codeRangeTable[2].Base);
|
|
|
103 |
RELOC_PTR(TExecution_Context, storage);
|
|
|
104 |
RELOC_PTR(TExecution_Context, stack);
|
|
|
105 |
/* zp0, // local, no gc invocations */
|
|
|
106 |
/* zp1, // local, no gc invocations */
|
|
|
107 |
/* zp2, // local, no gc invocations */
|
|
|
108 |
RELOC_PTR(TExecution_Context, pts.org_x);
|
|
|
109 |
RELOC_PTR(TExecution_Context, pts.org_y);
|
|
|
110 |
RELOC_PTR(TExecution_Context, pts.cur_x);
|
|
|
111 |
RELOC_PTR(TExecution_Context, pts.cur_y);
|
|
|
112 |
RELOC_PTR(TExecution_Context, pts.touch);
|
|
|
113 |
RELOC_PTR(TExecution_Context, pts.contours);
|
|
|
114 |
RELOC_PTR(TExecution_Context, twilight.org_x);
|
|
|
115 |
RELOC_PTR(TExecution_Context, twilight.org_y);
|
|
|
116 |
RELOC_PTR(TExecution_Context, twilight.cur_x);
|
|
|
117 |
RELOC_PTR(TExecution_Context, twilight.cur_y);
|
|
|
118 |
RELOC_PTR(TExecution_Context, twilight.touch);
|
|
|
119 |
RELOC_PTR(TExecution_Context, twilight.contours);
|
|
|
120 |
RELOC_PTR(TExecution_Context, cvt);
|
|
|
121 |
DISCARD(mptr);
|
|
|
122 |
}
|
|
|
123 |
RELOC_PTRS_END
|
|
|
124 |
|
|
|
125 |
gs_public_st_composite(st_ttfFont, ttfFont,
|
|
|
126 |
"ttfFont", ttfFont_enum_ptrs, ttfFont_reloc_ptrs);
|
|
|
127 |
|
|
|
128 |
private
|
|
|
129 |
ENUM_PTRS_BEGIN(ttfFont_enum_ptrs) return 0;
|
|
|
130 |
ENUM_PTR(0, ttfFont, face);
|
|
|
131 |
ENUM_PTR(1, ttfFont, inst);
|
|
|
132 |
ENUM_PTR(2, ttfFont, exec);
|
|
|
133 |
ENUM_PTR(3, ttfFont, tti);
|
|
|
134 |
ENUM_PTRS_END
|
|
|
135 |
|
|
|
136 |
private RELOC_PTRS_WITH(ttfFont_reloc_ptrs, ttfFont *mptr)
|
|
|
137 |
RELOC_PTR(ttfFont, face);
|
|
|
138 |
RELOC_PTR(ttfFont, inst);
|
|
|
139 |
RELOC_PTR(ttfFont, exec);
|
|
|
140 |
RELOC_PTR(ttfFont, tti);
|
|
|
141 |
DISCARD(mptr);
|
|
|
142 |
RELOC_PTRS_END
|
|
|
143 |
|
|
|
144 |
gs_public_st_ptrs3(st_ttfInterpreter, ttfInterpreter, "ttfInterpreter",
|
|
|
145 |
st_ttfInterpreter_enum_ptrs, st_ttfInterpreter_reloc_ptrs,
|
|
|
146 |
exec, usage, ttf_memory);
|