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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
|
/****************************************************************************
*
* tfmdrivr.c
*
* FreeType font driver for TeX's TFM FONT files
*
* Copyright 1996-2018 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
* modified, and distributed under the terms of the FreeType project
* license, LICENSE.TXT. By continuing to use, modify, or distribute
* this file you indicate that you have read the license and
* understand and accept it fully.
*
*/
#include <ft2build.h>
#include FT_INTERNAL_DEBUG_H
#include FT_INTERNAL_STREAM_H
#include FT_INTERNAL_OBJECTS_H
#include FT_TRUETYPE_IDS_H
#include FT_SERVICE_FONT_FORMAT_H
#include "tfm.h"
#include "tfmdrivr.h"
#include "tfmerror.h"
/**************************************************************************
*
* The macro FT_COMPONENT is used in trace mode. It is an implicit
* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log
* messages during execution.
*/
#undef FT_COMPONENT
#define FT_COMPONENT trace_tfmdriver
typedef struct TFM_CMapRec_
{
FT_CMapRec cmap;
/* TO-DO */
} TFM_CMapRec, *TFM_CMap;
FT_CALLBACK_DEF( FT_Error )
tfm_cmap_init( FT_CMap tfmcmap,
FT_Pointer init_data )
{
/* TO-DO */
}
FT_CALLBACK_DEF( void )
tfm_cmap_done( FT_CMap tfmcmap )
{
/* TO-DO */
}
FT_CALLBACK_DEF( FT_UInt )
tfm_cmap_char_index( FT_CMap tfmcmap,
FT_UInt32 char_code )
{
/* TO-DO */
}
FT_CALLBACK_DEF( FT_UInt )
tfm_cmap_char_next( FT_CMap tfmcmap,
FT_UInt32 *achar_code )
{
/* TO-DO */
}
static
const FT_CMap_ClassRec tfm_cmap_class =
{
sizeof ( TFM_CMapRec ),
tfm_cmap_init,
tfm_cmap_done,
tfm_cmap_char_index,
tfm_cmap_char_next,
NULL, NULL, NULL, NULL, NULL
};
FT_CALLBACK_DEF( void )
TFM_Face_Done( FT_Face tfmface ) /* TFM_Face */
{
/* TO-DO */
}
FT_CALLBACK_DEF( FT_Error )
TFM_Face_Init( FT_Stream stream,
FT_Face tfmface, /* TFM_Face */
FT_Int face_index,
FT_Int num_params,
FT_Parameter* params )
{
/* TO-DO */
}
FT_CALLBACK_DEF( FT_Error )
TFM_Size_Select( FT_Size size,
FT_ULong strike_index )
{
/* TO-DO */
}
FT_CALLBACK_DEF( FT_Error )
TFM_Size_Request( FT_Size size,
FT_Size_Request req )
{
/* TO-DO */
}
FT_CALLBACK_DEF( FT_Error )
TFM_Glyph_Load( FT_GlyphSlot slot,
FT_Size size,
FT_UInt glyph_index,
FT_Int32 load_flags )
{
/* TO-DO */
}
FT_CALLBACK_TABLE_DEF
const FT_Driver_ClassRec tfm_driver_class =
{
{
FT_MODULE_FONT_DRIVER |
FT_MODULE_DRIVER_NO_OUTLINES,
sizeof ( FT_DriverRec ),
"tfm",
0x10000L,
0x20000L,
NULL, /* module-specific interface */
NULL, /* FT_Module_Constructor module_init */
NULL, /* FT_Module_Destructor module_done */
NULL /* FT_Module_Requester get_interface */
},
sizeof ( TFM_FaceRec ),
sizeof ( FT_SizeRec ),
sizeof ( FT_GlyphSlotRec ),
TFM_Face_Init, /* FT_Face_InitFunc init_face */
TFM_Face_Done, /* FT_Face_DoneFunc done_face */
NULL, /* FT_Size_InitFunc init_size */
NULL, /* FT_Size_DoneFunc done_size */
NULL, /* FT_Slot_InitFunc init_slot */
NULL, /* FT_Slot_DoneFunc done_slot */
TFM_Glyph_Load, /* FT_Slot_LoadFunc load_glyph */
NULL, /* FT_Face_GetKerningFunc get_kerning */
NULL, /* FT_Face_AttachFunc attach_file */
NULL, /* FT_Face_GetAdvancesFunc get_advances */
TFM_Size_Request, /* FT_Size_RequestFunc request_size */
TFM_Size_Select /* FT_Size_SelectFunc select_size */
};
/* END */
|