sdk-world v2026.11.05
PS2 SDK - world tier (copyleft-allowed, non-essential packages)
Loading...
Searching...
No Matches
svmm.h
Go to the documentation of this file.
1/****************************************************************************
2 *
3 * svmm.h
4 *
5 * The FreeType Multiple Masters and GX var services (specification).
6 *
7 * Copyright (C) 2003-2025 by
8 * David Turner, Robert Wilhelm, Werner Lemberg, and Dominik Röttsches.
9 *
10 * This file is part of the FreeType project, and may only be used,
11 * modified, and distributed under the terms of the FreeType project
12 * license, LICENSE.TXT. By continuing to use, modify, or distribute
13 * this file you indicate that you have read the license and
14 * understand and accept it fully.
15 *
16 */
17
18
23#ifndef SVMM_H_
24#define SVMM_H_
25
26#include <freetype/ftmm.h>
29
30
31FT_BEGIN_HEADER
32
33
34 /*
35 * A service used to manage multiple-masters data in a given face.
36 *
37 * See the related APIs in `ftmm.h' (FT_MULTIPLE_MASTERS_H).
38 *
39 */
40
41#define FT_SERVICE_ID_MULTI_MASTERS "multi-masters"
42
43
44 typedef FT_Error
45 (*FT_Get_MM_Func)( FT_Face face,
46 FT_Multi_Master* master );
47
48 typedef FT_Error
49 (*FT_Get_MM_Var_Func)( FT_Face face,
50 FT_MM_Var* *master );
51
52 typedef FT_Error
53 (*FT_Set_MM_Design_Func)( FT_Face face,
54 FT_UInt num_coords,
55 FT_Long* coords );
56
57 /* use return value -1 to indicate that the new coordinates */
58 /* are equal to the current ones; no changes are thus needed */
59 typedef FT_Error
60 (*FT_Set_Var_Design_Func)( FT_Face face,
61 FT_UInt num_coords,
62 FT_Fixed* coords );
63
64 /* use return value -1 to indicate that the new coordinates */
65 /* are equal to the current ones; no changes are thus needed */
66 typedef FT_Error
67 (*FT_Set_MM_Blend_Func)( FT_Face face,
68 FT_UInt num_coords,
69 FT_Fixed* coords );
70
71 typedef FT_Error
72 (*FT_Get_Var_Design_Func)( FT_Face face,
73 FT_UInt num_coords,
74 FT_Fixed* coords );
75
76 typedef FT_Error
77 (*FT_Set_Named_Instance_Func)( FT_Face face,
78 FT_UInt instance_index );
79
80 typedef FT_Error
81 (*FT_Get_Default_Named_Instance_Func)( FT_Face face,
82 FT_UInt *instance_index );
83
84 typedef FT_Error
85 (*FT_Get_MM_Blend_Func)( FT_Face face,
86 FT_UInt num_coords,
87 FT_Fixed* coords );
88
89 typedef FT_Error
90 (*FT_Get_Var_Blend_Func)( FT_Face face,
91 FT_UInt *num_coords,
92 FT_Fixed* *coords,
93 FT_Fixed* *normalizedcoords,
94 FT_MM_Var* *mm_var );
95
96 typedef void
97 (*FT_Done_Blend_Func)( FT_Face face );
98
99 typedef FT_Error
100 (*FT_Set_MM_WeightVector_Func)( FT_Face face,
101 FT_UInt len,
102 FT_Fixed* weight_vector );
103
104 typedef FT_Error
105 (*FT_Get_MM_WeightVector_Func)( FT_Face face,
106 FT_UInt* len,
107 FT_Fixed* weight_vector );
108
109 typedef void
110 (*FT_Construct_PS_Name_Func)( FT_Face face );
111
112 typedef FT_Error
113 (*FT_Var_Load_Delta_Set_Idx_Map_Func)( FT_Face face,
114 FT_ULong offset,
115 GX_DeltaSetIdxMap map,
116 GX_ItemVarStore itemStore,
117 FT_ULong table_len );
118
119 typedef FT_Error
120 (*FT_Var_Load_Item_Var_Store_Func)( FT_Face face,
121 FT_ULong offset,
122 GX_ItemVarStore itemStore );
123
124 typedef FT_ItemVarDelta
125 (*FT_Var_Get_Item_Delta_Func)( FT_Face face,
126 GX_ItemVarStore itemStore,
127 FT_UInt outerIndex,
128 FT_UInt innerIndex );
129
130 typedef void
131 (*FT_Var_Done_Item_Var_Store_Func)( FT_Face face,
132 GX_ItemVarStore itemStore );
133
134 typedef void
135 (*FT_Var_Done_Delta_Set_Idx_Map_Func)( FT_Face face,
136 GX_DeltaSetIdxMap deltaSetIdxMap );
137
138
139 FT_DEFINE_SERVICE( MultiMasters )
140 {
141 FT_Get_MM_Func get_mm;
142 FT_Set_MM_Design_Func set_mm_design;
143 FT_Set_MM_Blend_Func set_mm_blend;
144 FT_Get_MM_Blend_Func get_mm_blend;
145 FT_Get_MM_Var_Func get_mm_var;
146 FT_Set_Var_Design_Func set_var_design;
147 FT_Get_Var_Design_Func get_var_design;
148 FT_Set_Named_Instance_Func set_named_instance;
149 FT_Get_Default_Named_Instance_Func get_default_named_instance;
150 FT_Set_MM_WeightVector_Func set_mm_weightvector;
151 FT_Get_MM_WeightVector_Func get_mm_weightvector;
152
153 /* for internal use; only needed for code sharing between modules */
154 FT_Construct_PS_Name_Func construct_ps_name;
155 FT_Var_Load_Delta_Set_Idx_Map_Func load_delta_set_idx_map;
156 FT_Var_Load_Item_Var_Store_Func load_item_var_store;
157 FT_Var_Get_Item_Delta_Func get_item_delta;
158 FT_Var_Done_Item_Var_Store_Func done_item_var_store;
159 FT_Var_Done_Delta_Set_Idx_Map_Func done_delta_set_idx_map;
160 FT_Get_Var_Blend_Func get_var_blend;
161 FT_Done_Blend_Func done_blend;
162 };
163
164
165#define FT_DEFINE_SERVICE_MULTIMASTERSREC( class_, \
166 get_mm_, \
167 set_mm_design_, \
168 set_mm_blend_, \
169 get_mm_blend_, \
170 get_mm_var_, \
171 set_var_design_, \
172 get_var_design_, \
173 set_named_instance_, \
174 get_default_named_instance_, \
175 set_mm_weightvector_, \
176 get_mm_weightvector_, \
177 \
178 construct_ps_name_, \
179 load_delta_set_idx_map_, \
180 load_item_var_store_, \
181 get_item_delta_, \
182 done_item_var_store_, \
183 done_delta_set_idx_map_, \
184 get_var_blend_, \
185 done_blend_ ) \
186 static const FT_Service_MultiMastersRec class_ = \
187 { \
188 get_mm_, \
189 set_mm_design_, \
190 set_mm_blend_, \
191 get_mm_blend_, \
192 get_mm_var_, \
193 set_var_design_, \
194 get_var_design_, \
195 set_named_instance_, \
196 get_default_named_instance_, \
197 set_mm_weightvector_, \
198 get_mm_weightvector_, \
199 \
200 construct_ps_name_, \
201 load_delta_set_idx_map_, \
202 load_item_var_store_, \
203 get_item_delta_, \
204 done_item_var_store_, \
205 done_delta_set_idx_map_, \
206 get_var_blend_, \
207 done_blend_ \
208 };
209
210 /* */
211
212
213FT_END_HEADER
214
215#endif /* SVMM_H_ */
216
217
218/* END */