64 const INT nItemsBroken[2])
69 ULONG tags[15] = {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1};
73 if (nItemsBroken && (
broken(nItemsBroken[0] == outnItems) ||
broken(nItemsBroken[1] == outnItems)))
81 for (
x = 0;
x <= outnItems;
x++)
84 winetest_win_skip(
"This test broken on this platform: item %d CharPos %d\n",
x, outpItems[
x].iCharPos);
86 winetest_ok(outpItems[
x].iCharPos ==
items[
x].iCharPos,
"%i:Wrong CharPos (%i)\n",
x,outpItems[
x].iCharPos);
89 winetest_win_skip(
"This test broken on this platform: item %d fRTL %d\n",
x, outpItems[
x].
a.fRTL);
94 winetest_win_skip(
"This test broken on this platform: item %d fLayoutRTL %d\n",
x, outpItems[
x].
a.fLayoutRTL);
99 winetest_win_skip(
"This test broken on this platform: item %d BidiLevel %d\n",
x, outpItems[
x].
a.s.uBidiLevel);
103 if (
items[
x].isBroken &&
broken(outpItems[
x].
a.s.fOverrideDirection ==
items[
x].broken_value[4]))
104 winetest_win_skip(
"This test broken on this platform: item %d fOverrideDirection %d\n",
x, outpItems[
x].
a.s.fOverrideDirection);
117#define test_items_ok(a,b,c,d,e,f,g,h) (winetest_set_location(__FILE__,__LINE__), 0) ? 0 : _test_items_ok(a,b,c,d,e,f,g,h)
119#define MS_MAKE_TAG( _x1, _x2, _x3, _x4 ) \
120 ( ( (ULONG)_x4 << 24 ) | \
121 ( (ULONG)_x3 << 16 ) | \
122 ( (ULONG)_x2 << 8 ) | \
125#define latn_tag MS_MAKE_TAG('l','a','t','n')
126#define arab_tag MS_MAKE_TAG('a','r','a','b')
127#define thai_tag MS_MAKE_TAG('t','h','a','i')
128#define hebr_tag MS_MAKE_TAG('h','e','b','r')
129#define syrc_tag MS_MAKE_TAG('s','y','r','c')
130#define thaa_tag MS_MAKE_TAG('t','h','a','a')
131#define deva_tag MS_MAKE_TAG('d','e','v','a')
132#define beng_tag MS_MAKE_TAG('b','e','n','g')
133#define guru_tag MS_MAKE_TAG('g','u','r','u')
134#define gujr_tag MS_MAKE_TAG('g','u','j','r')
135#define orya_tag MS_MAKE_TAG('o','r','y','a')
136#define taml_tag MS_MAKE_TAG('t','a','m','l')
137#define telu_tag MS_MAKE_TAG('t','e','l','u')
138#define knda_tag MS_MAKE_TAG('k','n','d','a')
139#define mlym_tag MS_MAKE_TAG('m','l','y','m')
140#define mymr_tag MS_MAKE_TAG('m','y','m','r')
141#define tale_tag MS_MAKE_TAG('t','a','l','e')
142#define talu_tag MS_MAKE_TAG('t','a','l','u')
143#define khmr_tag MS_MAKE_TAG('k','h','m','r')
144#define hani_tag MS_MAKE_TAG('h','a','n','i')
145#define bopo_tag MS_MAKE_TAG('b','o','p','o')
146#define kana_tag MS_MAKE_TAG('k','a','n','a')
147#define hang_tag MS_MAKE_TAG('h','a','n','g')
148#define yi_tag MS_MAKE_TAG('y','i',' ',' ')
149#define ethi_tag MS_MAKE_TAG('e','t','h','i')
150#define mong_tag MS_MAKE_TAG('m','o','n','g')
151#define tfng_tag MS_MAKE_TAG('t','f','n','g')
152#define nko_tag MS_MAKE_TAG('n','k','o',' ')
153#define vai_tag MS_MAKE_TAG('v','a','i',' ')
154#define cher_tag MS_MAKE_TAG('c','h','e','r')
155#define cans_tag MS_MAKE_TAG('c','a','n','s')
156#define ogam_tag MS_MAKE_TAG('o','g','a','m')
157#define runr_tag MS_MAKE_TAG('r','u','n','r')
158#define brai_tag MS_MAKE_TAG('b','r','a','i')
159#define dsrt_tag MS_MAKE_TAG('d','s','r','t')
160#define osma_tag MS_MAKE_TAG('o','s','m','a')
161#define math_tag MS_MAKE_TAG('m','a','t','h')
165 static const WCHAR test1[] = {
't',
'e',
's',
't',0};
166 static const itemTest t11[2] = {{{0,0,0,0,0,0},0,0,0,0,0,
latn_tag,
FALSE},{{0,0,0,0,0,0},4,0,0,0,0,-1}};
167 static const itemTest t12[2] = {{{0,0,0,0,0,0},0,0,0,2,0,
latn_tag,
FALSE},{{0,0,0,0,0,0},4,0,0,0,0,-1,
FALSE}};
169 static const WCHAR test1b[] = {
' ',
' ',
' ',
' ',0};
170 static const itemTest t1b1[2] = {{{0,0,0,0,0,0},0,0,0,0,0,0,
FALSE},{{0,0,0,0,0,0},4,0,0,0,0,-1,
FALSE}};
171 static const itemTest t1b2[2] = {{{0,0,0,0,0,0},0,1,1,1,0,0,
FALSE},{{0,0,0,0,0,0},4,0,0,0,0,-1,
FALSE}};
173 static const WCHAR test1c[] = {
' ',
' ',
' ',
'1',
'2',
' ',0};
174 static const itemTest t1c1[2] = {{{0,0,0,0,0,0},0,0,0,0,0,0,
FALSE},{{0,0,0,0,0,0},6,0,0,0,0,-1,
FALSE}};
175 static const itemTest t1c2[4] = {{{0,0,0,0,0,0},0,1,1,1,0,0,
FALSE},{{0,0,0,0,0,0},3,0,1,2,0,0,
FALSE},{{0,0,0,0,0,0},5,1,1,1,0,0,
FALSE},{{0,0,0,0,0,0},6,0,0,0,0,-1,
FALSE}};
178 static const WCHAR test2[] = {
'1',
'2',
'3',
'-',
'5',
'2',0x064a,0x064f,0x0633,0x0627,0x0648,0x0650,0x064a,
'7',
'1',
'.',0};
179 static const itemTest t21[7] = {{{0,0,0,0,0,0},0,0,0,0,0,0,
FALSE},{{0,0,0,0,0,0},3,0,0,0,0,0,
FALSE},{{0,0,0,0,0,0},4,0,0,0,0,0,
FALSE},{{0,0,0,0,0,0},6,1,1,1,0,
arab_tag,
FALSE},{{0,0,0,0,0,0},13,0,0,0,0,0,
FALSE},{{0,0,0,0,0,0},15,0,0,0,0,0,
FALSE},{{0,0,0,0,0,0},16,0,0,0,0,-1,
FALSE}};
180 static const itemTest t22[5] = {{{0,0,0,0,0,0},0,0,0,2,0,0,
FALSE},{{0,0,0,0,0,0},6,1,1,1,0,
arab_tag,
FALSE},{{0,0,0,0,0,0},13,0,1,2,0,0,
FALSE},{{0,0,0,0,0,0},15,0,0,0,0,0,
FALSE},{{0,0,0,0,0,0},16,0,0,0,0,-1,
FALSE}};
181 static const itemTest t23[5] = {{{0,0,0,0,0,0},0,0,1,2,0,0,
FALSE},{{0,0,0,0,0,0},6,1,1,1,0,
arab_tag,
FALSE},{{0,0,0,0,0,0},13,0,1,2,0,0,
FALSE},{{0,0,0,0,0,0},15,1,1,1,0,0,
FALSE},{{0,0,0,0,0,0},16,0,0,0,0,-1,
FALSE}};
182 static const itemTest t24[5] = {{{0,0,0,0,0,0},0,0,0,0,1,0,
FALSE},
183 {{0,0,0,0,0,0},6,0,0,0,1,
arab_tag,
FALSE},
184 {{0,0,0,0,0,0},13,0,1,0,1,0,
FALSE},
185 {{0,0,0,0,0,0},15,0,0,0,1,0,
FALSE},
186 {{0,0,0,0,0,0},16,0,0,0,0,-1,
FALSE}};
188 static const WCHAR test2b[] = {
'A',
'B',
'C',
'-',
'D',
'E',
'F',
' ',0x0621,0x0623,0x0624,0};
189 static const itemTest t2b1[5] = {{{0,0,0,0,0,0},0,0,0,0,0,
latn_tag,
FALSE},{{0,0,0,0,0,0},3,0,0,0,0,0,
FALSE},{{0,0,0,0,0,0},4,0,0,0,0,
latn_tag,
FALSE},{{0,0,0,0,0,0},8,1,1,1,0,
arab_tag,
FALSE},{{0,0,0,0,0,0},11,0,0,0,0,-1,
FALSE}};
190 static const itemTest t2b2[5] = {{{0,0,0,0,0,0},0,0,0,2,0,
latn_tag,
FALSE},{{0,0,0,0,0,0},3,0,0,2,0,0,
FALSE},{{0,0,0,0,0,0},4,0,0,2,0,
latn_tag,
FALSE},{{0,0,0,0,0,0},7,1,1,1,0,
arab_tag,
FALSE},{{0,0,0,0,0,0},11,0,0,0,0,-1,
FALSE}};
191 static const itemTest t2b3[3] = {{{0,0,0,0,0,0},0,0,0,2,0,
latn_tag,
FALSE},{{0,0,0,0,0,0},7,1,1,1,0,
arab_tag,
FALSE},{{0,0,0,0,0,0},11,0,0,0,0,-1,
FALSE}};
192 static const itemTest t2b4[5] = {{{0,0,0,0,0,0},0,0,0,0,1,
latn_tag,
FALSE},
193 {{0,0,0,0,0,0},3,0,0,0,1,0,
FALSE},
194 {{0,0,0,0,0,0},4,0,0,0,1,
latn_tag,
FALSE},
195 {{0,0,0,0,0,0},8,0,0,0,1,
arab_tag,
FALSE},
196 {{0,0,0,0,0,0},11,0,0,0,0,-1,
FALSE}};
197 static const int b2[2] = {4,4};
200 static const WCHAR test2c[] = {
' ',0x0621,0x0623,0x0624,
'A',
'B',
'C',
'-',
'D',
'E',
'F',0};
201 static const itemTest t2c1[5] = {{{0,0,0,0,0,0},0,1,1,1,0,
arab_tag,
FALSE},{{0,0,0,0,0,0},4,0,0,0,0,
latn_tag,
FALSE},{{0,0,0,0,0,0},7,0,0,0,0,0,
FALSE},{{0,0,0,0,0,0},8,0,0,0,0,
latn_tag,
FALSE},{{0,0,0,0,0,0},11,0,0,0,0,-1,
FALSE}};
202 static const itemTest t2c2[6] = {{{0,0,0,0,0,0},0,0,0,0,0,0,
FALSE},{{0,0,0,0,0,0},1,1,1,1,0,
arab_tag,
FALSE},{{0,0,0,0,0,0},4,0,0,0,0,
latn_tag,
FALSE},{{0,0,0,0,0,0},7,0,0,0,0,0,
FALSE},{{0,0,0,0,0,0},8,0,0,0,0,
latn_tag,
FALSE},{{0,0,0,0,0,0},11,0,0,0,0,-1,
FALSE}};
203 static const itemTest t2c3[5] = {{{0,0,0,0,0,0},0,1,1,1,0,
arab_tag,
FALSE},{{0,0,0,0,0,0},4,0,0,2,0,
latn_tag,
FALSE},{{0,0,0,0,0,0},7,0,0,2,0,0,
FALSE},{{0,0,0,0,0,0},8,0,0,2,0,
latn_tag,
FALSE},{{0,0,0,0,0,0},11,0,0,0,0,-1,
FALSE}};
204 static const itemTest t2c4[3] = {{{0,0,0,0,0,0},0,1,1,1,0,
arab_tag,
FALSE},{{0,0,0,0,0,0},4,0,0,2,0,
latn_tag,
FALSE},{{0,0,0,0,0,0},11,0,0,0,0,-1,
FALSE}};
205 static const itemTest t2c5[5] = {{{0,0,0,0,0,0},0,0,0,0,1,
arab_tag,
FALSE},
206 {{0,0,0,0,0,0},4,0,0,0,1,
latn_tag,
FALSE},
207 {{0,0,0,0,0,0},7,0,0,0,1,0,
FALSE},
208 {{0,0,0,0,0,0},8,0,0,0,1,
latn_tag,
FALSE},
209 {{0,0,0,0,0,0},11,0,0,0,0,-1,
FALSE}};
212 static const WCHAR test2d[] = {
'A',
'B',
'C',
'-',
'D',
'E',
'F',0x0621,0x0623,0x0624,
' ',0};
213 static const itemTest t2d1[5] = {{{0,0,0,0,0,0},0,0,0,0,0,
latn_tag,
FALSE},{{0,0,0,0,0,0},3,0,0,0,0,0,
FALSE},{{0,0,0,0,0,0},4,0,0,0,0,
latn_tag,
FALSE},{{0,0,0,0,0,0},7,1,1,1,0,
arab_tag,
FALSE},{{0,0,0,0,0,0},11,0,0,0,0,-1,
FALSE}};
214 static const itemTest t2d2[6] = {{{0,0,0,0,0,0},0,0,0,0,0,
latn_tag,
FALSE},{{0,0,0,0,0,0},3,0,0,0,0,0,
FALSE},{{0,0,0,0,0,0},4,0,0,0,0,
latn_tag,
FALSE},{{0,0,0,0,0,0},7,1,1,1,0,
arab_tag,
FALSE},{{0,0,0,0,0,0},10,0,0,0,0,0,
FALSE},{{0,0,0,0,0,0},11,0,0,0,0,-1,
FALSE}};
215 static const itemTest t2d3[5] = {{{0,0,0,0,0,0},0,0,0,2,0,
latn_tag,
FALSE},{{0,0,0,0,0,0},3,0,0,2,0,0,
FALSE},{{0,0,0,0,0,0},4,0,0,2,0,
latn_tag,
FALSE},{{0,0,0,0,0,0},7,1,1,1,0,
arab_tag,
FALSE},{{0,0,0,0,0,0},11,0,0,0,0,-1,
FALSE}};
216 static const itemTest t2d4[3] = {{{0,0,0,0,0,0},0,0,0,2,0,
latn_tag,
FALSE},{{0,0,0,0,0,0},7,1,1,1,0,
arab_tag,
FALSE},{{0,0,0,0,0,0},11,0,0,0,0,-1,
FALSE}};
217 static const itemTest t2d5[5] = {{{0,0,0,0,0,0},0,0,0,0,1,
latn_tag,
FALSE},
218 {{0,0,0,0,0,0},3,0,0,0,1,0,
FALSE},
219 {{0,0,0,0,0,0},4,0,0,0,1,
latn_tag,
FALSE},
220 {{0,0,0,0,0,0},7,0,0,0,1,
arab_tag,
FALSE},
221 {{0,0,0,0,0,0},11,0,0,0,0,-1,
FALSE}};
225{0x0e04,0x0e27,0x0e32,0x0e21,0x0e1e,0x0e22,0x0e32,0x0e22,0x0e32, 0x0e21
226,0x0e2d,0x0e22,0x0e39,0x0e48,0x0e17,0x0e35,0x0e48,0x0e44,0x0e2b,0x0e19
227,0x0e04,0x0e27,0x0e32,0x0e21,0x0e2a, 0x0e33,0x0e40,0x0e23,0x0e47,0x0e08,
228 0x0e2d,0x0e22,0x0e39,0x0e48,0x0e17,0x0e35,0x0e48,0x0e19,0x0e31,0x0e48,0x0e19,0};
230 static const itemTest t31[2] = {{{0,0,0,0,0,0},0,0,0,0,0,
thai_tag,
FALSE},{{0,0,0,0,0,0},41,0,0,0,0,-1,
FALSE}};
231 static const itemTest t32[2] = {{{0,0,0,0,0,0},0,0,0,2,0,
thai_tag,
FALSE},{{0,0,0,0,0,0},41,0,0,0,0,-1,
FALSE}};
233 static const WCHAR test4[] = {
'1',
'2',
'3',
'-',
'5',
'2',
' ',
'i',
's',
' ',
'7',
'1',
'.',0};
235 static const itemTest t41[6] = {{{0,0,0,0,0,0},0,0,0,0,0,0,
FALSE},{{0,0,0,0,0,0},3,0,0,0,0,0,
FALSE},{{0,0,0,0,0,0},4,0,0,0,0,0,
FALSE},{{0,0,0,0,0,0},7,0,0,0,0,
latn_tag,
FALSE},{{0,0,0,0,0,0},10,0,0,0,0,0,
FALSE},{{0,0,0,0,0,0},12,0,0,0,0,-1,
FALSE}};
236 static const itemTest t42[5] = {{{0,0,0,0,0,0},0,0,1,2,0,0,
FALSE},{{0,0,0,0,0,0},6,1,1,1,0,0,
FALSE},{{0,0,0,0,0,0},7,0,0,2,0,
latn_tag,
FALSE},{{0,0,0,0,0,0},10,0,0,2,0,0,
FALSE},{{0,0,0,0,0,0},12,0,0,0,0,-1,
FALSE}};
237 static const itemTest t43[4] = {{{0,0,0,0,0,0},0,0,1,2,0,0,
FALSE},{{0,0,0,0,0,0},6,1,1,1,0,0,
FALSE},{{0,0,0,0,0,0},7,0,0,2,0,
latn_tag,
FALSE},{{0,0,0,0,0,0},12,0,0,0,0,-1,
FALSE}};
238 static const int b43[2] = {4,4};
241 static const WCHAR test5[] = {0x0627,0x0644,0x0635,0x0651,0x0650,0x062d,0x0629,0x064f,
' ',0x062a,0x064e,
242 0x0627,0x062c,0x064c,
' ',0x0639,0x064e,0x0644,0x0649,
' ',
243 0x0631,0x064f,0x0624,0x0648,0x0633,0x0650,
' ',0x0627,0x0644,
244 0x0623,0x0635,0x0650,0x062d,0x0651,0x064e,0x0627,0x0621,0x0650,0};
245 static const itemTest t51[2] = {{{0,0,0,0,0,0},0,1,1,1,0,
arab_tag,
FALSE},{{0,0,0,0,0,0},38,0,0,0,0,-1,
FALSE}};
246 static const itemTest t52[2] = {{{0,0,0,0,0,0},0,0,0,0,1,
arab_tag,
FALSE},
247 {{0,0,0,0,0,0},38,0,0,0,0,-1,
FALSE}};
251 static const WCHAR test6[] = {0x05e9, 0x05dc, 0x05d5, 0x05dd,
'.',0};
252 static const itemTest t61[3] = {{{0,0,0,0,0,0},0,1,1,1,0,
hebr_tag,
TRUE,{-1,0,0,0,-1,-1}},{{0,0,0,0,0,0},4,0,0,0,0,0,
FALSE},{{0,0,0,0,0,0},5,0,0,0,0,-1,
FALSE}};
253 static const itemTest t62[3] = {{{0,0,0,0,0,0},0,1,1,1,0,
hebr_tag,
FALSE},{{0,0,0,0,0,0},4,1,1,1,0,0,
FALSE},{{0,0,0,0,0,0},5,0,0,0,0,-1,
FALSE}};
254 static const itemTest t63[2] = {{{0,0,0,0,0,0},0,1,1,1,0,
hebr_tag,
FALSE},{{0,0,0,0,0,0},5,0,0,0,0,-1,
FALSE}};
255 static const itemTest t64[3] = {{{0,0,0,0,0,0},0,0,0,0,1,
hebr_tag,
FALSE},
256 {{0,0,0,0,0,0},4,0,0,0,1,0,
FALSE},
257 {{0,0,0,0,0,0},5,0,0,0,0,-1,
FALSE}};
259 static const int b63[2] = {2,2};
260 static const WCHAR test7[] = {
'p',
'a',
'r',
't',
' ',
'o',
'n',
'e',
' ',0x05d7, 0x05dc, 0x05e7,
' ', 0x05e9, 0x05ea, 0x05d9, 0x05d9, 0x05dd,
' ',
'p',
'a',
'r',
't',
' ',
't',
'h',
'r',
'e',
'e', 0};
261 static const itemTest t71[4] = {{{0,0,0,0,0,0},0,0,0,0,0,
latn_tag,
FALSE},{{0,0,0,0,0,0},9,1,1,1,0,
hebr_tag,
TRUE,{-1,0,0,0,-1,-1}},{{0,0,0,0,0,0},19,0,0,0,0,
latn_tag,
FALSE},{{0,0,0,0,0,0},29,0,0,0,0,-1,
FALSE}};
262 static const itemTest t72[4] = {{{0,0,0,0,0,0},0,0,0,0,0,
latn_tag,
FALSE},{{0,0,0,0,0,0},9,1,1,1,0,
hebr_tag,
FALSE},{{0,0,0,0,0,0},18,0,0,0,0,
latn_tag,
FALSE},{{0,0,0,0,0,0},29,0,0,0,0,-1,
FALSE}};
263 static const itemTest t73[4] = {{{0,0,0,0,0,0},0,0,0,2,0,
latn_tag,
FALSE},{{0,0,0,0,0,0},8,1,1,1,0,
hebr_tag,
FALSE},{{0,0,0,0,0,0},19,0,0,2,0,
latn_tag,
FALSE},{{0,0,0,0,0,0},29,0,0,0,0,-1,
FALSE}};
264 static const itemTest t74[4] = {{{0,0,0,0,0,0},0,0,0,0,1,
latn_tag,
FALSE},
265 {{0,0,0,0,0,0},9,0,0,0,1,
hebr_tag,
FALSE},
266 {{0,0,0,0,0,0},19,0,0,0,1,
latn_tag,
FALSE},
267 {{0,0,0,0,0,0},29,0,0,0,0,-1,
FALSE}};
269 static const WCHAR test8[] = {0x0633, 0x0644, 0x0627, 0x0645,0};
270 static const itemTest t81[2] = {{{0,0,0,0,0,0},0,1,1,1,0,
arab_tag,
FALSE},{{0,0,0,0,0,0},4,0,0,0,0,-1,
FALSE}};
271 static const itemTest t82[2] = {{{0,0,0,0,0,0},0,0,0,0,1,
arab_tag,
FALSE},
272 {{0,0,0,0,0,0},4,0,0,0,0,-1,
FALSE}};
275 static const WCHAR test9[] = {0x0710, 0x0712, 0x0712, 0x0714,
'.',0};
276 static const itemTest t91[3] = {{{0,0,0,0,0,0},0,1,1,1,0,
syrc_tag,
FALSE},{{0,0,0,0,0,0},4,0,0,0,0,0,
FALSE},{{0,0,0,0,0,0},5,0,0,0,0,-1,
FALSE}};
277 static const itemTest t92[3] = {{{0,0,0,0,0,0},0,1,1,1,0,
syrc_tag},{{0,0,0,0,0,0},4,1,1,1,0,0,
FALSE},{{0,0,0,0,0,0},5,0,0,0,0,-1,
FALSE}};
278 static const itemTest t93[2] = {{{0,0,0,0,0,0},0,1,1,1,0,
syrc_tag,
FALSE},{{0,0,0,0,0,0},5,0,0,0,0,-1,
FALSE}};
279 static const itemTest t94[3] = {{{0,0,0,0,0,0},0,0,0,0,1,
syrc_tag,
FALSE},
280 {{0,0,0,0,0,0},4,0,0,0,1,0,
FALSE},
281 {{0,0,0,0,0,0},5,0,0,0,0,-1,
FALSE}};
282 static const int b93[2] = {2,2};
284 static const WCHAR test10[] = {0x0717, 0x0718, 0x071a, 0x071b,0};
285 static const itemTest t101[2] = {{{0,0,0,0,0,0},0,1,1,1,0,
syrc_tag,
FALSE},{{0,0,0,0,0,0},4,0,0,0,0,-1,
FALSE}};
286 static const itemTest t102[2] = {{{0,0,0,0,0,0},0,0,0,0,1,
syrc_tag,
FALSE},
287 {{0,0,0,0,0,0},4,0,0,0,0,-1,
FALSE}};
290 static const WCHAR test11[] = {0x0926, 0x0947, 0x0935, 0x0928, 0x093e, 0x0917, 0x0930, 0x0940};
291 static const itemTest t111[2] = {{{0,0,0,0,0,0},0,0,0,0,0,
deva_tag,
FALSE},{{0,0,0,0,0,0},8,0,0,0,0,-1,
FALSE}};
292 static const itemTest t112[2] = {{{0,0,0,0,0,0},0,0,0,2,0,
deva_tag,
FALSE},{{0,0,0,0,0,0},8,0,0,0,0,-1,
FALSE}};
295 static const WCHAR test12[] = {0x09ac, 0x09be, 0x0982, 0x09b2, 0x09be};
296 static const itemTest t121[2] = {{{0,0,0,0,0,0},0,0,0,0,0,
beng_tag,
FALSE},{{0,0,0,0,0,0},5,0,0,0,0,-1,
FALSE}};
297 static const itemTest t122[2] = {{{0,0,0,0,0,0},0,0,0,2,0,
beng_tag,
FALSE},{{0,0,0,0,0,0},5,0,0,0,0,-1,
FALSE}};
300 static const WCHAR test13[] = {0x0a17, 0x0a41, 0x0a30, 0x0a2e, 0x0a41, 0x0a16, 0x0a40};
301 static const itemTest t131[2] = {{{0,0,0,0,0,0},0,0,0,0,0,
guru_tag,
FALSE},{{0,0,0,0,0,0},7,0,0,0,0,-1,
FALSE}};
302 static const itemTest t132[2] = {{{0,0,0,0,0,0},0,0,0,2,0,
guru_tag,
FALSE},{{0,0,0,0,0,0},7,0,0,0,0,-1,
FALSE}};
305 static const WCHAR test14[] = {0x0a97, 0x0ac1, 0x0a9c, 0x0ab0, 0x0abe, 0x0aa4, 0x0ac0};
306 static const itemTest t141[2] = {{{0,0,0,0,0,0},0,0,0,0,0,
gujr_tag,
FALSE},{{0,0,0,0,0,0},7,0,0,0,0,-1,
FALSE}};
307 static const itemTest t142[2] = {{{0,0,0,0,0,0},0,0,0,2,0,
gujr_tag,
FALSE},{{0,0,0,0,0,0},7,0,0,0,0,-1,
FALSE}};
310 static const WCHAR test15[] = {0x0b13, 0x0b21, 0x0b3c, 0x0b3f, 0x0b06};
311 static const itemTest t151[2] = {{{0,0,0,0,0,0},0,0,0,0,0,
orya_tag,
FALSE},{{0,0,0,0,0,0},5,0,0,0,0,-1,
FALSE}};
312 static const itemTest t152[2] = {{{0,0,0,0,0,0},0,0,0,2,0,
orya_tag,
FALSE},{{0,0,0,0,0,0},5,0,0,0,0,-1,
FALSE}};
315 static const WCHAR test16[] = {0x0ba4, 0x0bae, 0x0bbf, 0x0bb4, 0x0bcd};
316 static const itemTest t161[2] = {{{0,0,0,0,0,0},0,0,0,0,0,
taml_tag,
FALSE},{{0,0,0,0,0,0},5,0,0,0,0,-1,
FALSE}};
317 static const itemTest t162[2] = {{{0,0,0,0,0,0},0,0,0,2,0,
taml_tag,
FALSE},{{0,0,0,0,0,0},5,0,0,0,0,-1,
FALSE}};
320 static const WCHAR test17[] = {0x0c24, 0x0c46, 0x0c32, 0x0c41, 0x0c17, 0x0c41};
321 static const itemTest t171[2] = {{{0,0,0,0,0,0},0,0,0,0,0,
telu_tag,
FALSE},{{0,0,0,0,0,0},6,0,0,0,0,-1,
FALSE}};
322 static const itemTest t172[2] = {{{0,0,0,0,0,0},0,0,0,2,0,
telu_tag,
FALSE},{{0,0,0,0,0,0},6,0,0,0,0,-1,
FALSE}};
325 static const WCHAR test18[] = {0x0c95, 0x0ca8, 0x0ccd, 0x0ca8, 0x0ca1};
326 static const itemTest t181[2] = {{{0,0,0,0,0,0},0,0,0,0,0,
knda_tag,
FALSE},{{0,0,0,0,0,0},5,0,0,0,0,-1,
FALSE}};
327 static const itemTest t182[2] = {{{0,0,0,0,0,0},0,0,0,2,0,
knda_tag,
FALSE},{{0,0,0,0,0,0},5,0,0,0,0,-1,
FALSE}};
330 static const WCHAR test19[] = {0x0d2e, 0x0d32, 0x0d2f, 0x0d3e, 0x0d33, 0x0d02};
331 static const itemTest t191[2] = {{{0,0,0,0,0,0},0,0,0,0,0,
mlym_tag,
FALSE},{{0,0,0,0,0,0},6,0,0,0,0,-1,
FALSE}};
332 static const itemTest t192[2] = {{{0,0,0,0,0,0},0,0,0,2,0,
mlym_tag,
FALSE},{{0,0,0,0,0,0},6,0,0,0,0,-1,
FALSE}};
335 static const WCHAR test20[] = {0x0309,
'a',
'b',
'c',
'd',0};
336 static const itemTest t201[3] = {{{0,0,0,0,0,0},0,0,0,0,0x0,0,
FALSE},{{0,0,0,0,0,0},1,0,0,0,0,
latn_tag,
FALSE},{{0,0,0,0,0,0},5,0,0,0,0,-1,
FALSE}};
337 static const itemTest t202[3] = {{{0,0,0,0,0,0},0,0,0,2,0,0,
TRUE,{-1,1,1,1,-1,-1}},{{0,0,0,0,0,0},1,0,0,2,0,
latn_tag,
FALSE},{{0,0,0,0,0,0},5,0,0,0,0,-1,
FALSE}};
339 static const WCHAR test21[] = {0x0710, 0x0712, 0x0308, 0x0712, 0x0714,0};
340 static const itemTest t211[2] = {{{0,0,0,0,0,0},0,1,1,1,0,
syrc_tag,
FALSE},{{0,0,0,0,0,0},5,0,0,0,0,-1,
FALSE}};
341 static const itemTest t212[2] = {{{0,0,0,0,0,0},0,0,0,0,1,
syrc_tag,
FALSE},
342 {{0,0,0,0,0,0},5,0,0,0,0,-1,
FALSE}};
345 static const WCHAR test22[] = {
'#',
'$',
',',
'!',
'\"',
'*',0};
346 static const itemTest t221[3] = {{{0,0,0,0,0,0},0,0,0,0,0,
latn_tag,
FALSE},{{0,0,0,0,0,0},3,0,0,0,0,0,
FALSE},{{0,0,0,0,0,0},6,0,0,0,0,-1,
FALSE}};
347 static const itemTest t222[3] = {{{0,0,0,0,0,0},0,1,1,1,0,
latn_tag,
FALSE},{{0,0,0,0,0,0},3,1,1,1,0,0,
FALSE},{{0,0,0,0,0,0},6,0,0,0,0,-1,
FALSE}};
348 static const itemTest t223[2] = {{{0,0,0,0,0,0},0,1,1,1,0,
latn_tag,
FALSE},{{0,0,0,0,0,0},6,0,0,0,0,-1,
FALSE}};
349 static const int b222[2] = {1,1};
350 static const int b223[2] = {2,2};
353 static const WCHAR test23[] = {
'1',
'2',
'3',0x00b2,0x00b3,0x2070,0};
354 static const itemTest t231[3] = {{{0,0,0,0,0,0},0,0,0,0,0,0,
FALSE},{{0,0,0,0,0,0},3,0,0,0,0,0,
FALSE},{{0,0,0,0,0,0},6,0,0,0,0,-1,
FALSE}};
355 static const itemTest t232[3] = {{{0,0,0,0,0,0},0,0,1,2,0,0,
FALSE},{{0,0,0,0,0,0},3,0,1,2,0,0,
FALSE},{{0,0,0,0,0,0},6,0,0,0,0,-1,
FALSE}};
358 static const WCHAR test24[] = {0x1019,0x103c,0x1014,0x103a,0x1019,0x102c,0x1021,0x1000,0x1039,0x1001,0x101b,0x102c};
359 static const itemTest t241[2] = {{{0,0,0,0,0,0},0,0,0,0,0,
mymr_tag,
FALSE},{{0,0,0,0,0,0},12,0,0,0,0,-1,
FALSE}};
360 static const itemTest t242[2] = {{{0,0,0,0,0,0},0,0,0,2,0,
mymr_tag,
TRUE,{-1,1,1,1,-1,-1}},{{0,0,0,0,0,0},12,0,0,0,0,-1,
FALSE}};
363 static const WCHAR test25[] = {0x1956,0x196d,0x1970,0x1956,0x196c,0x1973,0x1951,0x1968,0x1952,0x1970};
364 static const itemTest t251[2] = {{{0,0,0,0,0,0},0,0,0,0,0,
tale_tag,
TRUE,{-1,-1,-1,-1,-1,
latn_tag}},{{0,0,0,0,0,0},10,0,0,0,0,-1,
FALSE}};
365 static const itemTest t252[2] = {{{0,0,0,0,0,0},0,0,0,2,0,
tale_tag,
TRUE,{-1,1,1,1,-1,
latn_tag}},{{0,0,0,0,0,0},10,0,0,0,0,-1,
FALSE}};
368 static const WCHAR test26[] = {0x1992,0x19c4};
369 static const itemTest t261[2] = {{{0,0,0,0,0,0},0,0,0,0,0,
talu_tag,
TRUE,{-1,-1,-1,-1,-1,
latn_tag}},{{0,0,0,0,0,0},2,0,0,0,0,-1,
FALSE}};
370 static const itemTest t262[2] = {{{0,0,0,0,0,0},0,0,0,2,0,
talu_tag,
TRUE,{-1,1,1,1,-1,
latn_tag}},{{0,0,0,0,0,0},2,0,0,0,0,-1,
FALSE}};
373 static const WCHAR test27[] = {0x1781,0x17c1,0x1798,0x179a,0x1797,0x17b6,0x179f,0x17b6};
374 static const itemTest t271[2] = {{{0,0,0,0,0,0},0,0,0,0,0,
khmr_tag,
FALSE},{{0,0,0,0,0,0},8,0,0,0,0,-1,
FALSE}};
375 static const itemTest t272[2] = {{{0,0,0,0,0,0},0,0,0,2,0,
khmr_tag,
TRUE,{-1,1,1,1,-1,-1}},{{0,0,0,0,0,0},8,0,0,0,0,-1,
FALSE}};
378 static const WCHAR test28[] = {0x8bed,0x7d20,0x6587,0x5b57};
379 static const itemTest t281[2] = {{{0,0,0,0,0,0},0,0,0,0,0,
hani_tag,
FALSE},{{0,0,0,0,0,0},4,0,0,0,0,-1,
FALSE}};
380 static const itemTest t282[2] = {{{0,0,0,0,0,0},0,0,0,2,0,
hani_tag,
FALSE},{{0,0,0,0,0,0},4,0,0,0,0,-1,
FALSE}};
383 static const WCHAR test29[] = {0x2ff0,0x2ff3,0x2ffb,0x2ff0,0x65e5,0x65e5,0x5de5,0x7f51,0x4e02,0x4e5e};
384 static const itemTest t291[3] = {{{0,0,0,0,0,0},0,0,0,0,0,
hani_tag,
FALSE},{{0,0,0,0,0,0},4,0,0,0,0,
hani_tag,
FALSE},{{0,0,0,0,0,0},10,0,0,0,0,-1,
FALSE}};
385 static const itemTest t292[3] = {{{0,0,0,0,0,0},0,1,1,1,0,
hani_tag,
FALSE},{{0,0,0,0,0,0},4,0,0,2,0,
hani_tag,
FALSE},{{0,0,0,0,0,0},10,0,0,0,0,-1,
FALSE}};
388 static const WCHAR test30[] = {0x3113,0x3128,0x3127,0x3123,0x3108,0x3128,0x310f,0x3120};
389 static const itemTest t301[2] = {{{0,0,0,0,0,0},0,0,0,0,0,
bopo_tag,
FALSE},{{0,0,0,0,0,0},8,0,0,0,0,-1,
FALSE}};
390 static const itemTest t302[2] = {{{0,0,0,0,0,0},0,0,0,2,0,
bopo_tag,
FALSE},{{0,0,0,0,0,0},8,0,0,0,0,-1,
FALSE}};
393 static const WCHAR test31[] = {0x3072,0x3089,0x304b,0x306a,0x30ab,0x30bf,0x30ab,0x30ca};
394 static const itemTest t311[2] = {{{0,0,0,0,0,0},0,0,0,0,0,
kana_tag,
FALSE},{{0,0,0,0,0,0},8,0,0,0,0,-1,
FALSE}};
395 static const itemTest t312[2] = {{{0,0,0,0,0,0},0,0,0,2,0,
kana_tag,
FALSE},{{0,0,0,0,0,0},8,0,0,0,0,-1,
FALSE}};
396 static const int b311[2] = {2,2};
397 static const int b312[2] = {2,2};
400 static const WCHAR test32[] = {0xd55c,0xad6d,0xc5b4};
401 static const itemTest t321[2] = {{{0,0,0,0,0,0},0,0,0,0,0,
hang_tag,
FALSE},{{0,0,0,0,0,0},3,0,0,0,0,-1,
FALSE}};
402 static const itemTest t322[2] = {{{0,0,0,0,0,0},0,0,0,2,0,
hang_tag,
FALSE},{{0,0,0,0,0,0},3,0,0,0,0,-1,
FALSE}};
405 static const WCHAR test33[] = {0xa188,0xa320,0xa071,0xa0b7};
406 static const itemTest t331[2] = {{{0,0,0,0,0,0},0,0,0,0,0,
yi_tag,
FALSE},{{0,0,0,0,0,0},4,0,0,0,0,-1,
FALSE}};
407 static const itemTest t332[2] = {{{0,0,0,0,0,0},0,0,0,2,0,
yi_tag,
FALSE},{{0,0,0,0,0,0},4,0,0,0,0,-1,
FALSE}};
410 static const WCHAR test34[] = {0x130d,0x12d5,0x12dd};
411 static const itemTest t341[2] = {{{0,0,0,0,0,0},0,0,0,0,0,
ethi_tag,
FALSE},{{0,0,0,0,0,0},3,0,0,0,0,-1,
FALSE}};
412 static const itemTest t342[2] = {{{0,0,0,0,0,0},0,0,0,2,0,
ethi_tag,
FALSE},{{0,0,0,0,0,0},3,0,0,0,0,-1,
FALSE}};
413 static const int b342[2] = {2,2};
416 static const WCHAR test35[] = {0x182e,0x1823,0x1829,0x182d,0x1823,0x182f,0x0020,0x182a,0x1822,0x1834,0x1822,0x182d,0x180c};
417 static const itemTest t351[2] = {{{0,0,0,0,0,0},0,0,0,0,0,
mong_tag,
FALSE},{{0,0,0,0,0,0},13,0,0,0,0,-1,
FALSE}};
418 static const int b351[2] = {2,2};
419 static const itemTest t352[2] = {{{0,0,0,0,0,0},0,0,0,2,0,
mong_tag,
TRUE,{-1,1,1,1,-1,-1}},{{0,0,0,0,0,0},13,0,0,0,0,-1,
FALSE}};
420 static const int b352[2] = {2,3};
421 static const itemTest t353[2] = {{{0,0,0,0,1,0},0,0,0,0,1,
mong_tag,
TRUE,{-1,-1,-1,-1,0,0}},{{0,0,0,0,0,0},13,0,0,0,0,-1,
FALSE}};
424 static const WCHAR test36[] = {0x2d5c,0x2d49,0x2d3c,0x2d49,0x2d4f,0x2d30,0x2d56};
425 static const itemTest t361[2] = {{{0,0,0,0,0,0},0,0,0,0,0,
tfng_tag,
TRUE,{-1,-1,-1,-1,-1,
latn_tag}},{{0,0,0,0,0,0},7,0,0,0,0,-1,
FALSE}};
426 static const itemTest t362[2] = {{{0,0,0,0,0,0},0,0,0,2,0,
tfng_tag,
TRUE,{-1,1,1,1,-1,
latn_tag}},{{0,0,0,0,0,0},7,0,0,0,0,-1,
FALSE}};
429 static const WCHAR test37[] = {0x07d2,0x07de,0x07cf};
430 static const itemTest t371[2] = {{{0,0,0,0,0,0},0,1,1,1,0,
nko_tag,
TRUE,{-1,0,0,0,-1,
arab_tag}},{{0,0,0,0,0,0},3,0,0,0,0,-1,
FALSE}};
431 static const itemTest t372[2] = {{{0,0,0,0,0,0},0,1,1,1,0,
nko_tag,
TRUE,{-1,0,0,2,-1,
arab_tag}},{{0,0,0,0,0,0},3,0,0,0,0,-1,
FALSE}};
432 static const itemTest t373[2] = {{{0,0,0,0,0,0},0,0,0,0,1,
nko_tag,
TRUE,{-1,-1,-1,2,0,
arab_tag}}, {{0,0,0,0,0,0},3,0,0,0,0,-1,
FALSE}};
435 static const WCHAR test38[] = {0xa559,0xa524};
436 static const itemTest t381[2] = {{{0,0,0,0,0,0},0,0,0,0,0,
vai_tag,
TRUE,{-1,-1,-1,-1,-1,
latn_tag}},{{0,0,0,0,0,0},2,0,0,0,0,-1,
FALSE}};
437 static const itemTest t382[2] = {{{0,0,0,0,0,0},0,0,0,2,0,
vai_tag,
TRUE,{-1,1,1,1,-1,
latn_tag}},{{0,0,0,0,0,0},2,0,0,0,0,-1,
FALSE}};
440 static const WCHAR test39[] = {0x13e3,0x13b3,0x13a9,0x0020,0x13a6,0x13ec,0x13c2,0x13af,0x13cd,0x13d7};
441 static const itemTest t391[2] = {{{0,0,0,0,0,0},0,0,0,0,0,
cher_tag,
FALSE},{{0,0,0,0,0,0},10,0,0,0,0,-1,
FALSE}};
442 static const itemTest t392[2] = {{{0,0,0,0,0,0},0,0,0,2,0,
cher_tag,
TRUE,{-1,1,1,1,-1,-1}},{{0,0,0,0,0,0},10,0,0,0,0,-1,
FALSE}};
445 static const WCHAR test40[] = {0x1403,0x14c4,0x1483,0x144e,0x1450,0x1466};
446 static const itemTest t401[2] = {{{0,0,0,0,0,0},0,0,0,0,0,
cans_tag,
FALSE},{{0,0,0,0,0,0},6,0,0,0,0,-1,
FALSE}};
447 static const itemTest t402[2] = {{{0,0,0,0,0,0},0,0,0,2,0,
cans_tag,
TRUE,{-1,1,1,1,-1,-1}},{{0,0,0,0,0,0},6,0,0,0,0,-1,
FALSE}};
450 static const WCHAR test41[] = {0x169b,0x1691,0x168c,0x1690,0x168b,0x169c};
451 static const itemTest t411[2] = {{{0,0,0,0,0,0},0,0,0,0,0,
ogam_tag,
FALSE},{{0,0,0,0,0,0},6,0,0,0,0,-1,
FALSE}};
452 static const itemTest t412[4] = {{{0,0,0,0,0,0},0,1,1,1,0,
ogam_tag,
FALSE},{{0,0,0,0,0,0},1,0,0,2,0,
ogam_tag,
FALSE},{{0,0,0,0,0,0},5,1,1,1,0,
ogam_tag,
FALSE},{{0,0,0,0,0,0},6,0,0,0,0,-1,
FALSE}};
453 static const int b412[2] = {1,1};
456 static const WCHAR test42[] = {0x16a0,0x16a1,0x16a2,0x16a3,0x16a4,0x16a5};
457 static const itemTest t421[2] = {{{0,0,0,0,0,0},0,0,0,0,0,
runr_tag,
FALSE},{{0,0,0,0,0,0},6,0,0,0,0,-1,
FALSE}};
458 static const itemTest t422[4] = {{{0,0,0,0,0,0},0,0,0,2,0,
runr_tag,
TRUE,{-1,1,1,1,-1,-1}},{{0,0,0,0,0,0},6,0,0,0,0,-1,
FALSE}};
461 static const WCHAR test43[] = {0x280f,0x2817,0x2811,0x280d,0x280a,0x2811,0x2817};
462 static const itemTest t431[2] = {{{0,0,0,0,0,0},0,0,0,0,0,
brai_tag,
FALSE},{{0,0,0,0,0,0},7,0,0,0,0,-1,
FALSE}};
463 static const itemTest t432[4] = {{{0,0,0,0,0,0},0,0,0,2,0,
brai_tag,
TRUE,{-1,1,1,1,-1,-1}},{{0,0,0,0,0,0},7,0,0,0,0,-1,
FALSE}};
466 static const WCHAR test44[] = {0xe000, 0xe001, 0xd800, 0xd801};
467 static const itemTest t441[3] = {{{0,0,0,0,0,0},0,0,0,0,0,0,
FALSE},{{0,0,0,0,0,0},2,0,0,0,0,0,
FALSE},{{0,0,0,0,0,0},4,0,0,0,0,-1,
FALSE}};
468 static const itemTest t442[4] = {{{0,0,0,0,0,0},0,0,0,2,0,0,
TRUE,{-1,1,1,1,-1,-1}},{{0,0,0,0,0,0},2,0,0,2,0,0,
TRUE,{-1,1,1,1,-1,-1}},{{0,0,0,0,0,0},4,0,0,0,0,-1,
FALSE}};
471 static const WCHAR test45[] = {0xd801,0xdc19,0xd801,0xdc32,0xd801,0xdc4c,0xd801,0xdc3c,0xd801,0xdc32,0xd801,0xdc4b,0xd801,0xdc2f,0xd801,0xdc4c,0xd801,0xdc3b,0xd801,0xdc32,0xd801,0xdc4a,0xd801,0xdc28};
472 static const itemTest t451[2] = {{{0,0,0,0,0,0},0,0,0,0,0,
dsrt_tag,
TRUE,{-1,-1,-1,-1,-1,0x0}},{{0,0,0,0,0,0},24,0,0,0,0,-1,
FALSE}};
473 static const itemTest t452[2] = {{{0,0,0,0,0,0},0,0,0,2,0,
dsrt_tag,
TRUE,{-1,1,1,1,-1,0x0}},{{0,0,0,0,0,0},24,0,0,0,0,-1,
FALSE}};
476 static const WCHAR test46[] = {0xd801,0xdc8b,0xd801,0xdc98,0xd801,0xdc88,0xd801,0xdc91,0xd801,0xdc9b,0xd801,0xdc92,0xd801,0xdc95,0xd801,0xdc80};
477 static const itemTest t461[2] = {{{0,0,0,0,0,0},0,0,0,0,0,
osma_tag,
TRUE,{-1,-1,-1,-1,-1,0x0}},{{0,0,0,0,0,0},16,0,0,0,0,-1,
FALSE}};
478 static const itemTest t462[2] = {{{0,0,0,0,0,0},0,0,0,2,0,
osma_tag,
TRUE,{-1,1,1,1,-1,0x0}},{{0,0,0,0,0,0},16,0,0,0,0,-1,
FALSE}};
481 static const WCHAR test47[] = {0xd835,0xdc00,0xd835,0xdc35,0xd835,0xdc6a,0xd835,0xdc9f,0xd835,0xdcd4,0xd835,0xdd09,0xd835,0xdd3e,0xd835,0xdd73,0xd835,0xdda8,0xd835,0xdddd,0xd835,0xde12,0xd835,0xde47,0xd835,0xde7c};
482 static const itemTest t471[2] = {{{0,0,0,0,0,0},0,0,0,0,0,
math_tag,
TRUE,{-1,-1,-1,-1,-1,0x0}},{{0,0,0,0,0,0},26,0,0,0,0,-1,
FALSE}};
483 static const itemTest t472[2] = {{{0,0,0,0,0,0},0,0,0,2,0,
math_tag,
TRUE,{-1,1,1,1,-1,0x0}},{{0,0,0,0,0,0},26,0,0,0,0,-1,
FALSE}};
487 static const WCHAR test48[] = {0x05e9,
' ',
'1',
'2',
'3',
'.'};
488 static const itemTest t481[4] = {{{0,0,0,0,0,0},0,1,1,1,0,
hebr_tag,
FALSE},
489 {{0,0,0,0,0},2,0,1,2,0,0,
FALSE},{{0,0,0,0,0},5,0,0,0,0,0,
FALSE},
490 {{0,0,0,0,0},6,0,0,0,0,-1,
FALSE}};
491 static const itemTest t482[4] = {{{0,0,0,0,0,0},0,0,0,0,1,
hebr_tag,
FALSE},
492 {{0,0,0,0,0,0},2,0,1,0,1,0,
FALSE},
493 {{0,0,0,0,0,0},5,0,0,0,1,0,
FALSE},
494 {{0,0,0,0,0,0},6,0,0,0,0,-1,
FALSE}};
496 static const WCHAR test49[] = {0x05e9,
' ',
'1',
'2',
'.',
'1',
'2'};
497 static const itemTest t491[3] = {{{0,0,0,0,0,0},0,1,1,1,0,
hebr_tag,
FALSE},
498 {{0,0,0,0,0},2,0,1,2,0,0,
FALSE},{{0,0,0,0,0},7,0,0,0,0,-1,
FALSE}};
499 static const itemTest t492[3] = {{{0,0,0,0,0,0},0,0,0,0,1,
hebr_tag,
FALSE},
500 {{0,0,0,0,0,0},2,0,1,0,1,0,
FALSE},
501 {{0,0,0,0,0,0},7,0,0,0,0,-1,
FALSE}};
503 static const WCHAR test50[] = {0x05e9,
' ',
'.',
'1',
'2',
'3'};
504 static const itemTest t501[4] = {{{0,0,0,0,0,0},0,1,1,1,0,
hebr_tag,
FALSE},
505 {{0,0,0,0,0},2,1,1,1,0,0,
FALSE},{{0,0,0,0,0},3,0,1,2,0,0,
FALSE},
506 {{0,0,0,0,0},6,0,0,0,0,-1,
FALSE}};
507 static const itemTest t502[4] = {{{0,0,0,0,0,0},0,0,0,0,1,
hebr_tag,
FALSE},
508 {{0,0,0,0,0,0},2,0,0,0,1,0,
FALSE},
509 {{0,0,0,0,0,0},3,0,1,0,1,0,
FALSE},
510 {{0,0,0,0,0,0},6,0,0,0,0,-1,
FALSE}};
512 static const WCHAR test51[] = {0x05e9,
' ',
'a',
'b',
'.',
'1',
'2'};
513 static const itemTest t511[5] = {{{0,0,0,0,0,0},0,1,1,1,0,
hebr_tag,
FALSE},
514 {{0,0,0,0,0},1,0,0,0,0,
latn_tag,
FALSE},{{0,0,0,0,0},4,0,0,0,0,0,
FALSE},
515 {{0,0,0,0,0},5,0,0,2,0,0,
FALSE},{{0,0,0,0,0},7,0,0,0,0,-1,
FALSE}};
516 static const itemTest t512[5] = {{{0,0,0,0,0,0},0,0,0,0,1,
hebr_tag,
FALSE},
517 {{0,0,0,0,0,0},2,0,0,0,1,
latn_tag,
FALSE},
518 {{0,0,0,0,0,0},4,0,0,0,1,0,
FALSE},
519 {{0,0,0,0,0,0},5,0,0,0,1,0,
FALSE},
520 {{0,0,0,0,0,0},7,0,0,0,0,-1,
FALSE}};
522 static const WCHAR test52[] = {0x05e9,
' ',
'1',
'2',
'.',
'a',
'b'};
523 static const itemTest t521[5] = {{{0,0,0,0,0,0},0,1,1,1,0,
hebr_tag,
FALSE},
524 {{0,0,0,0,0},2,0,1,2,0,0,
FALSE},{{0,0,0,0,0},4,0,0,0,0,0,
FALSE},
525 {{0,0,0,0,0},5,0,0,0,0,
latn_tag,
FALSE},{{0,0,0,0,0},7,0,0,0,0,-1,
FALSE}};
526 static const itemTest t522[5] = {{{0,0,0,0,0,0},0,0,0,0,1,
hebr_tag,
FALSE},
527 {{0,0,0,0,0,0},2,0,1,0,1,0,
FALSE},
528 {{0,0,0,0,0,0},4,0,0,0,1,0,
FALSE},
529 {{0,0,0,0,0,0},5,0,0,0,1,
latn_tag,
FALSE},
530 {{0,0,0,0,0,0},7,0,0,0,0,-1,
FALSE}};
532 static const WCHAR test53[] = {0x05e9,
' ',
'1',
'2',
'.',
'.',
'1',
'2'};
533 static const itemTest t531[5] = {{{0,0,0,0,0,0},0,1,1,1,0,
hebr_tag,
FALSE},
534 {{0,0,0,0,0},2,0,1,2,0,0,
FALSE},{{0,0,0,0,0},4,1,1,1,0,0,
FALSE},
535 {{0,0,0,0,0},6,0,1,2,0,0,
FALSE},{{0,0,0,0,0},8,0,0,0,0,-1,
FALSE}};
536 static const itemTest t532[5] = {{{0,0,0,0,0,0},0,0,0,0,1,
hebr_tag,
FALSE},
537 {{0,0,0,0,0,0},2,0,1,0,1,0,
FALSE},
538 {{0,0,0,0,0,0},4,0,0,0,1,0,
FALSE},
539 {{0,0,0,0,0,0},6,0,1,0,1,0,
FALSE},
540 {{0,0,0,0,0,0},8,0,0,0,0,-1,
FALSE}};
542 static const WCHAR test54[] = {0x05e9,
' ',
'1',
'2',
'+',
'1',
'2'};
543 static const itemTest t541[3] = {{{0,0,0,0,0,0},0,1,1,1,0,
hebr_tag,
FALSE},
544 {{0,0,0,0,0},2,0,1,2,0,0,
FALSE},{{0,0,0,0,0},7,0,0,0,0,-1,
FALSE}};
545 static const itemTest t542[3] = {{{0,0,0,0,0,0},0,0,0,0,1,
hebr_tag,
FALSE},
546 {{0,0,0,0,0,0},2,0,1,0,1,0,
FALSE},
547 {{0,0,0,0,0,0},7,0,0,0,0,-1,
FALSE}};
548 static const WCHAR test55[] = {0x05e9,
' ',
'1',
'2',
'+',
'+',
'1',
'2'};
549 static const itemTest t551[3] = {{{0,0,0,0,0,0},0,1,1,1,0,
hebr_tag,
FALSE},
550 {{0,0,0,0,0},2,0,1,2,0,0,
FALSE},{{0,0,0,0,0},8,0,0,0,0,-1,
FALSE}};
551 static const itemTest t552[3] = {{{0,0,0,0,0,0},0,0,0,0,1,
hebr_tag,
FALSE},
552 {{0,0,0,0,0,0},2,0,1,0,1,0,
FALSE},
553 {{0,0,0,0,0,0},8,0,0,0,0,-1,
FALSE}};
556 static const WCHAR test56[] = {0x0645, 0x06cc, 0x200c, 0x06a9, 0x0646, 0x0645};
557 static const itemTest t561[] = {{{0,0,0,0,0,0},0,1,1,1,0,
arab_tag,
FALSE},{{0,0,0,0,0,0},6,0,0,0,0,-1,
FALSE}};
558 static const itemTest t562[] = {{{0,0,0,0,0,0},0,0,0,0,1,
arab_tag,
FALSE},{{0,0,0,0,0,0},6,0,0,0,0,-1,
FALSE}};
561 static const WCHAR test57[] = {0x06f1, 0x06f2, 0x066c, 0x06f3, 0x06f4, 0x06f5, 0x066c,
562 0x06f6, 0x06f7, 0x06f8, 0x066b, 0x06f9, 0x06f0};
563 static const itemTest t571[] = {{{0,0,0,0,0,0}, 0,0,1,2,0,
arab_tag,
FALSE},{{0,0,0,0,0,0}, 2,0,1,2,0,
arab_tag,
FALSE},
564 {{0,0,0,0,0,0}, 3,0,1,2,0,
arab_tag,
FALSE},{{0,0,0,0,0,0}, 6,0,1,2,0,
arab_tag,
FALSE},
565 {{0,0,0,0,0,0}, 7,0,1,2,0,
arab_tag,
FALSE},{{0,0,0,0,0,0},10,0,1,2,0,
arab_tag,
FALSE},
566 {{0,0,0,0,0,0},11,0,1,2,0,
arab_tag,
FALSE},{{0,0,0,0,0,0},13,0,0,0,0,-1,
FALSE}};
567 static const itemTest t572[] = {{{0,0,0,0,0,0}, 0,0,0,2,0,
arab_tag,
FALSE},{{0,0,1,0,0,0}, 2,0,1,2,0,
arab_tag,
FALSE},
568 {{0,0,0,0,0,0}, 3,0,0,2,0,
arab_tag,
FALSE},{{0,0,1,0,0,0}, 6,0,1,2,0,
arab_tag,
FALSE},
569 {{0,0,0,0,0,0}, 7,0,0,2,0,
arab_tag,
FALSE},{{0,0,1,0,0,0},10,0,1,2,0,
arab_tag,
FALSE},
570 {{0,0,0,0,0,0},11,0,0,2,0,
arab_tag,
FALSE},{{0,0,0,0,0,0},13,0,0,0,0,-1,
FALSE}};
571 static const itemTest t573[] = {{{0,0,0,0,0,0}, 0,0,0,0,1,
arab_tag,
FALSE},{{0,0,0,0,0,0}, 2,0,0,0,1,
arab_tag,
FALSE},
572 {{0,0,0,0,0,0}, 3,0,0,0,1,
arab_tag,
FALSE},{{0,0,0,0,0,0}, 6,0,0,0,1,
arab_tag,
FALSE},
573 {{0,0,0,0,0,0}, 7,0,0,0,1,
arab_tag,
FALSE},{{0,0,0,0,0,0},10,0,0,0,1,
arab_tag,
FALSE},
574 {{0,0,0,0,0,0},11,0,0,0,1,
arab_tag,
FALSE},{{0,0,0,0,0,0},13,0,0,0,0,-1,
FALSE}};
576 static const WCHAR test58[] = {0x0661, 0x0662, 0x066c, 0x0663, 0x0664, 0x0665, 0x066c,
577 0x0666, 0x0667, 0x0668, 0x066b, 0x0669, 0x0660};
578 static const itemTest t581[] = {{{0,0,0,0,0,0}, 0,0,1,2,0,
arab_tag,
FALSE},
579 {{0,0,0,0,0,0},13,0,0,0,0,-1,
FALSE}};
580 static const itemTest t582[] = {{{0,0,1,1,1,0}, 0,0,0,0,1,
arab_tag,
FALSE},
581 {{0,0,0,0,0,0},13,0,0,0,0,-1,
FALSE}};
593 ok (
hr ==
E_INVALIDARG,
"ScriptItemize should return E_INVALIDARG if pwcInChars is NULL\n");
596 ok (
hr ==
E_INVALIDARG,
"ScriptItemize should return E_INVALIDARG if pItems is NULL\n");
599 ok (
hr ==
E_INVALIDARG,
"ScriptItemize should return E_INVALIDARG if cMaxItems < 2.\n");
602 ok (
hr ==
E_INVALIDARG,
"ScriptItemize should return E_INVALIDARG if cInChars is 0\n");
660 State.uBidiLevel = 0;
725 State.uBidiLevel = 1;
782 State.uBidiLevel = 1;
840 State.uBidiLevel = 0;
842 State.fOverrideDirection = 1;
920 out[0] = ((
i >> 10) &
mask) + 0xd800;
934 surrogate[0] = 0xd800;
936 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr );
944 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr );
957 int x, outnItems = 0, outnGlyphs = 0, outnGlyphs2 = 0;
961 WORD *glyphs, *glyphs2;
962 WORD *logclust, *logclust2;
963 int maxGlyphs = cchString * 1.5;
979 if (outnItems <=
item)
989 memset(logclust,
'a',
sizeof(
WORD) * cchString);
999 memset(logclust2,
'a', cchString *
sizeof(*logclust2));
1001 memset(charProp2,
'a', cchString *
sizeof(*charProp2));
1003 memset(glyphs2,
'a', maxGlyphs *
sizeof(*glyphs2));
1005 memset(glyphProp2,
'a', maxGlyphs *
sizeof(*glyphProp2));
1007 winetest_ok(!outpItems[
item].
a.fLogicalOrder,
"Got unexpected fLogicalOrder %#x.\n",
1009 hr =
ScriptShapeOpenType(
hdc, &sc, &outpItems[
item].
a,
tags[
item], 0x00000000,
NULL,
NULL, 0,
string, cchString, maxGlyphs, logclust, charProp, glyphs, glyphProp, &outnGlyphs);
1017 for (
x = 0;
x < cchString;
x++)
1020 winetest_ok(logclust[
x] == charItems[
x].wLogClust,
"%i: invalid LogClust(%i)\n",
x,logclust[
x]);
1021 else if (logclust[
x] != charItems[
x].wLogClust)
1024 winetest_ok(charProp[
x].fCanGlyphAlone == charItems[
x].CharProp.fCanGlyphAlone,
"%i: invalid fCanGlyphAlone\n",
x);
1025 else if (charProp[
x].fCanGlyphAlone != charItems[
x].CharProp.fCanGlyphAlone)
1030 winetest_ok(nGlyphs == outnGlyphs,
"got incorrect number of glyphs (%i)\n",outnGlyphs);
1031 else if (nGlyphs != outnGlyphs)
1032 winetest_trace(
"got incorrect number of glyphs (%i)\n",outnGlyphs);
1033 for (
x = 0;
x <
min(nGlyphs, outnGlyphs);
x++)
1035 if (glyphItems[
x].Glyph)
1038 winetest_ok(glyphs[
x]!=0,
"%i: Glyph not present when it should be\n",
x);
1039 else if (glyphs[
x]==0)
1045 winetest_ok(glyphs[
x]==0,
"%i: Glyph present when it should not be\n",
x);
1046 else if (glyphs[
x]!=0)
1058 winetest_trace(
"%i: uJustification incorrect (%i)\n",
x,glyphProp[
x].sva.uJustification);
1065 winetest_trace(
"%i: fClusterStart incorrect (%i)\n",
x,glyphProp[
x].sva.fClusterStart);
1071 winetest_trace(
"%i: fDiacritic incorrect (%i)\n",
x,glyphProp[
x].sva.fDiacritic);
1077 winetest_trace(
"%i: fZeroWidth incorrect (%i)\n",
x,glyphProp[
x].sva.fZeroWidth);
1082 string, cchString, maxGlyphs, logclust2, charProp2, glyphs2, glyphProp2, &outnGlyphs2);
1087 for (
x = 0;
x < cchString; ++
x)
1089 unsigned int compare_idx = outpItems[
item].
a.
fRTL ? cchString -
x - 1 :
x;
1091 "Got unexpected logclust2[%u] %#x, expected %#x.\n",
1092 x, logclust2[
x], logclust[compare_idx]);
1093 winetest_ok(charProp2[
x].fCanGlyphAlone == charProp[compare_idx].fCanGlyphAlone,
1094 "Got unexpected charProp2[%u].fCanGlyphAlone %#x, expected %#x.\n",
1095 x, charProp2[
x].fCanGlyphAlone, charProp[compare_idx].fCanGlyphAlone);
1098 winetest_ok(outnGlyphs2 == outnGlyphs,
"Got unexpected glyph count %u.\n", outnGlyphs2);
1099 for (
x = 0;
x < outnGlyphs2; ++
x)
1101 unsigned int compare_idx = outpItems[
item].
a.
fRTL ? outnGlyphs2 -
x - 1 :
x;
1102 winetest_ok(glyphs2[
x] == glyphs[compare_idx],
"Got unexpected glyphs2[%u] %#x, expected %#x.\n",
1103 x, glyphs2[
x], glyphs[compare_idx]);
1105 "Got unexpected glyphProp2[%u].sva.uJustification %#x, expected %#x.\n",
1108 "Got unexpected glyphProp2[%u].sva.fClusterStart %#x, expected %#x.\n",
1111 "Got unexpected glyphProp2[%u].sva.fDiacritic %#x, expected %#x.\n",
1114 "Got unexpected glyphProp2[%u].sva.fZeroWidth %#x, expected %#x.\n",
1128 for (
x = 0;
x < cchString; ++
x)
1135 string2, cchString, maxGlyphs, logclust2, charProp2, glyphs2, glyphProp2, &outnGlyphs2);
1137 for (
x = 0;
x < cchString; ++
x)
1139 unsigned int compare_idx = cchString -
x - 1;
1141 "Got unexpected logclust2[%u] %#x, expected %#x.\n",
1142 x, logclust2[
x], logclust[compare_idx]);
1143 winetest_ok(charProp2[
x].fCanGlyphAlone == charProp[compare_idx].fCanGlyphAlone,
1144 "Got unexpected charProp2[%u].fCanGlyphAlone %#x, expected %#x.\n",
1145 x, charProp2[
x].fCanGlyphAlone, charProp[compare_idx].fCanGlyphAlone);
1147 winetest_ok(outnGlyphs2 == outnGlyphs,
"Got unexpected glyph count %u.\n", outnGlyphs2);
1148 for (
x = 0;
x < outnGlyphs2; ++
x)
1150 winetest_ok(glyphs2[
x] == glyphs[
x],
"Got unexpected glyphs2[%u] %#x, expected %#x.\n",
1151 x, glyphs2[
x], glyphs[
x]);
1153 "Got unexpected glyphProp2[%u].sva.uJustification %#x, expected %#x.\n",
1156 "Got unexpected glyphProp2[%u].sva.fClusterStart %#x, expected %#x.\n",
1159 "Got unexpected glyphProp2[%u].sva.fDiacritic %#x, expected %#x.\n",
1162 "Got unexpected glyphProp2[%u].sva.fZeroWidth %#x, expected %#x.\n",
1167 string2, cchString, maxGlyphs, logclust2, charProp2, glyphs2, glyphProp2, &outnGlyphs2);
1169 for (
x = 0;
x < cchString; ++
x)
1171 unsigned int compare_idx = outpItems[
item].
a.
fRTL ?
x : cchString -
x - 1;
1172 winetest_ok(logclust2[
x] == logclust[compare_idx],
"Got unexpected logclust2[%u] %#x, expected %#x.\n",
1173 x, logclust2[
x], logclust[compare_idx]);
1174 winetest_ok(charProp2[
x].fCanGlyphAlone == charProp[compare_idx].fCanGlyphAlone,
1175 "Got unexpected charProp2[%u].fCanGlyphAlone %#x, expected %#x.\n",
1176 x, charProp2[
x].fCanGlyphAlone, charProp[compare_idx].fCanGlyphAlone);
1178 winetest_ok(outnGlyphs2 == outnGlyphs,
"Got unexpected glyph count %u.\n", outnGlyphs2);
1179 for (
x = 0;
x < outnGlyphs2; ++
x)
1181 unsigned int compare_idx = outpItems[
item].
a.
fRTL ? outnGlyphs2 -
x - 1 :
x;
1182 winetest_ok(glyphs2[
x] == glyphs[compare_idx],
"Got unexpected glyphs2[%u] %#x, expected %#x.\n",
1183 x, glyphs2[
x], glyphs[compare_idx]);
1185 "Got unexpected glyphProp2[%u].sva.uJustification %#x, expected %#x.\n",
1188 "Got unexpected glyphProp2[%u].sva.fClusterStart %#x, expected %#x.\n",
1191 "Got unexpected glyphProp2[%u].sva.fDiacritic %#x, expected %#x.\n",
1194 "Got unexpected glyphProp2[%u].sva.fZeroWidth %#x, expected %#x.\n",
1213#define test_shape_ok(a,b,c,d,e,f,g,h,i) \
1214 (winetest_set_location(__FILE__,__LINE__), 0) ? 0 : _test_shape_ok(1,a,b,c,d,e,f,g,h,i,NULL)
1216#define test_shape_ok_valid(v,a,b,c,d,e,f,g,h,i) \
1217 (winetest_set_location(__FILE__,__LINE__), 0) ? 0 : _test_shape_ok(v,a,b,c,d,e,f,g,h,i,NULL)
1219#define test_shape_ok_valid_props2(v,a,b,c,d,e,f,g,h,i,j) \
1220 (winetest_set_location(__FILE__,__LINE__), 0) ? 0 : _test_shape_ok(v,a,b,c,d,e,f,g,h,i,j)
1239 while (
i >=
sizeof(
DWORD)*8)
1283 for (
i=0;
i < 10;
i++)
1284 if (output[
i] != fingerprint->
result[
i])
1292 if (
i == 10) rc = 1;
1338#define find_font_for_range(a,b,c,d,e,f,g) (winetest_set_location(__FILE__,__LINE__), 0) ? 0 : _find_font_for_range(a,b,c,d,e,f,g)
1344 WORD glyphs[4], logclust[4];
1351 HFONT
hfont, hfont_orig;
1355 static const WCHAR test1[] = {
'w',
'i',
'n',
'e',0};
1356 static const shapeTest_char t1_c[] = {{0,{0,0}},{1,{0,0}},{2,{0,0}},{3,{0,0}}};
1363 static const WCHAR test2[] = {0x202B,
'i',
'n', 0x202C,0};
1364 static const shapeTest_char t2_c[] = {{0,{0,0}},{1,{0,0}},{2,{0,0}},{3,{0,0}}};
1371 static const WCHAR test3[] = {
't',
't',
'f',
'f',
'f',
'i', 0};
1372 static const shapeTest_char t3_c[] = {{0, {0, 0}}, {0, {0, 0}}, {0, {0, 0}},
1373 {1, {0, 0}}, {1, {0, 0}}, {1, {0, 0}}};
1379 static const WCHAR test_hebrew[] = {0x05e9, 0x05dc, 0x05d5, 0x05dd,0};
1380 static const shapeTest_char hebrew_c[] = {{3,{0,0}},{2,{0,0}},{1,{0,0}},{0,{0,0}}};
1388 static const WCHAR test_arabic[] = {0x0633,0x0644,0x0627,0x0645,0};
1389 static const shapeTest_char arabic_c[] = {{2,{0,0}},{1,{0,0}},{1,{0,0}},{0,{0,0}}};
1396 static const WCHAR test_thai[] = {0x0e2a, 0x0e04, 0x0e23, 0x0e34, 0x0e1b, 0x0e15, 0x0e4c, 0x0e44, 0x0e17, 0x0e22,};
1397 static const shapeTest_char thai_c[] = {{0,{0,0}},{1,{0,0}},{2,{0,0}},{2,{0,0}},{4,{0,0}},{5,{0,0}},{5,{0,0}},{7,{0,0}},{8,{0,0}},{9,{0,0}}};
1411 static const WCHAR test_syriac[] = {0x0710, 0x072c, 0x0728, 0x0742, 0x0718, 0x0723, 0x0720, 0x0710, 0};
1412 static const shapeTest_char syriac_c[] = {{6, {0, 0}}, {5, {0, 0}}, {4, {0, 0}},
1413 {4, {0, 0}}, {2, {0, 0}}, {1, {0, 0}}, {0, {0, 0}}, {0, {0, 0}}};
1424 static const WCHAR test_thaana[] = {0x078a, 0x07ae, 0x0792, 0x07b0, 0x0020, 0x0796, 0x07aa, 0x0789, 0x07b0, 0x0795, 0x07ac, 0x0791, 0x07b0};
1425 static const shapeTest_char thaana_c[] = {{12,{0,0}},{12,{0,0}},{10,{0,0}},{10,{0,0}},{8,{1,0}},{7,{0,0}},{7,{0,0}},{5,{0,0}},{5,{0,0}},{3,{0,0}},{3,{0,0}},{1,{0,0}},{1,{0,0}}};
1442 static const WCHAR test_phagspa[] = {0xa84f, 0xa861, 0xa843, 0x0020, 0xa863, 0xa861, 0xa859, 0x0020, 0xa850, 0xa85c, 0xa85e};
1443 static const shapeTest_char phagspa_c[] = {{0,{0,0}},{1,{0,0}},{2,{0,0}},{3,{1,0}},{4,{0,0}},{5,{0,0}},{6,{0,0}},{7,{1,0}},{8,{0,0}},{9,{0,0}},{10,{0,0}}};
1470 static const WCHAR test_lao[] = {0x0ead, 0x0eb1, 0x0e81, 0x0eaa, 0x0ead, 0x0e99, 0x0ea5, 0x0eb2, 0x0ea7, 0};
1471 static const shapeTest_char lao_c[] = {{0,{0,0}},{0,{0,0}},{2,{0,0}},{3,{0,0}},{4,{0,0}},{5,{0,0}},{6,{0,0}},{7,{0,0}},{8,{0,0}}};
1484 static const WCHAR test_tibetan[] = {0x0f04, 0x0f05, 0x0f0e, 0x0020, 0x0f51, 0x0f7c, 0x0f53, 0x0f0b, 0x0f5a, 0x0f53, 0x0f0b, 0x0f51, 0x0f44, 0x0f0b, 0x0f54, 0x0f7c, 0x0f0d};
1485 static const shapeTest_char tibetan_c[] = {{0,{0,0}},{1,{0,0}},{2,{0,0}},{3,{1,0}},{4,{0,0}},{4,{0,0}},{6,{0,0}},{7,{0,0}},{8,{0,0}},{9,{0,0}},{10,{0,0}},{11,{0,0}},{12,{0,0}},{13,{0,0}},{14,{0,0}},{14,{0,0}},{16,{0,0}}};
1524 static const WCHAR test_devanagari[] = {0x0926, 0x0947, 0x0935, 0x0928, 0x093e, 0x0917, 0x0930, 0x0940};
1525 static const shapeTest_char devanagari_c[] = {{0,{0,0}},{0,{0,0}},{2,{0,0}},{3,{0,0}},{3,{0,0}},{5,{0,0}},{6,{0,0}},{6,{0,0}}};
1537 static const WCHAR test_bengali[] = {0x09ac, 0x09be, 0x0982, 0x09b2, 0x09be};
1538 static const shapeTest_char bengali_c[] = {{0,{0,0}},{0,{0,0}},{0,{0,0}},{3,{0,0}},{3,{0,0}}};
1547 static const WCHAR test_gurmukhi[] = {0x0a17, 0x0a41, 0x0a30, 0x0a2e, 0x0a41, 0x0a16, 0x0a40};
1548 static const shapeTest_char gurmukhi_c[] = {{0,{0,0}},{0,{0,0}},{2,{0,0}},{3,{0,0}},{3,{0,0}},{5,{0,0}},{5,{0,0}}};
1559 static const WCHAR test_gujarati[] = {0x0a97, 0x0ac1, 0x0a9c, 0x0ab0, 0x0abe, 0x0aa4, 0x0ac0};
1560 static const shapeTest_char gujarati_c[] = {{0,{0,0}},{0,{0,0}},{2,{0,0}},{3,{0,0}},{3,{0,0}},{5,{0,0}},{5,{0,0}}};
1571 static const WCHAR test_oriya[] = {0x0b13, 0x0b21, 0x0b3c, 0x0b3f, 0x0b06};
1572 static const shapeTest_char oriya_c[] = {{0,{0,0}},{1,{0,0}},{1,{0,0}},{1,{0,0}},{3,{0,0}}};
1580 static const WCHAR test_tamil[] = {0x0ba4, 0x0bae, 0x0bbf, 0x0bb4, 0x0bcd};
1581 static const shapeTest_char tamil_c[] = {{0,{0,0}},{1,{0,0}},{1,{0,0}},{3,{0,0}},{3,{0,0}}};
1589 static const WCHAR test_telugu[] = {0x0c24, 0x0c46, 0x0c32, 0x0c41, 0x0c17, 0x0c41};
1590 static const shapeTest_char telugu_c[] = {{0,{0,0}},{0,{0,0}},{2,{0,0}},{2,{0,0}},{4,{0,0}},{4,{0,0}}};
1600 static const WCHAR test_malayalam[] = {0x0d2e, 0x0d32, 0x0d2f, 0x0d3e, 0x0d33, 0x0d02};
1601 static const shapeTest_char malayalam_c[] = {{0,{0,0}},{1,{0,0}},{2,{0,0}},{2,{0,0}},{4,{0,0}},{4,{0,0}}};
1611 static const WCHAR test_kannada[] = {0x0c95, 0x0ca8, 0x0ccd, 0x0ca8, 0x0ca1};
1612 static const shapeTest_char kannada_c[] = {{0,{0,0}},{1,{0,0}},{1,{0,0}},{1,{0,0}},{3,{0,0}}};
1621 static const WCHAR test_hiragana[] = {0x306b, 0x307b, 0x3093, 0x3054};
1622 static const shapeTest_char hiragana_c[] = {{0,{0,0}},{1,{0,0}},{2,{0,0}},{3,{0,0}}};
1630 static const WCHAR test_katakana[] = {0x30b3, 0x30fc, 0x30c9};
1631 static const shapeTest_char katakana_c[] = {{0,{0,0}},{1,{0,0}},{2,{0,0}}};
1637 static const WCHAR test_cjk[] = {0x4e2d, 0x6587, 0x65e5, 0x672c, 0x8a9e};
1638 static const shapeTest_char cjk_c[] = {{0,{0,0}},{1,{0,0}},{2,{0,0}},{3,{0,0}},{4,{0,0}}};
1647 {
'A',
'a',
'B',
'b',
'C',
'c',
'D',
'd',0,0},
1648 {284,310,285,311,286,312,287,313,0,0}};
1655 ok(
items[0].
a.fNoGlyphIndex ==
FALSE,
"fNoGlyphIndex TRUE\n");
1657 hr =
ScriptShapeOpenType(
hdc, &sc, &
items[0].
a,
tags[0], 0x00000000,
NULL,
NULL, 0,
test1, 4, 4,
NULL,
NULL, glyphs,
NULL, &nb);
1660 hr =
ScriptShapeOpenType(
hdc, &sc, &
items[0].
a,
tags[0], 0x00000000,
NULL,
NULL, 0,
test1, 4, 4,
NULL,
NULL, glyphs, glyphProp,
NULL);
1663 hr =
ScriptShapeOpenType(
NULL, &sc, &
items[0].
a,
tags[0], 0x00000000,
NULL,
NULL, 0,
test1, 4, 4,
NULL,
NULL, glyphs, glyphProp, &nb);
1666 hr =
ScriptShapeOpenType(
hdc, &sc, &
items[0].
a,
tags[0], 0x00000000,
NULL,
NULL, 0,
test1, 4, 4,
NULL,
NULL, glyphs, glyphProp, &nb);
1668 hr =
ScriptShapeOpenType(
hdc, &sc, &
items[0].
a,
tags[0], 0x00000000,
NULL,
NULL, 0,
test1, 4, 4, logclust,
NULL, glyphs, glyphProp, &nb);
1676 memcpy(glyph_test, t2_g,
sizeof(glyph_test));
1679 glyph_test[0].
Glyph = 1;
1681 glyph_test[3].
Glyph = 1;
1737 phagspa_c, phagspa_g, phagspa_win10_props);
1754 tibetan_c, tibetan_g, tibetan_win10_props);
1858 static const WCHAR test1[] = {
'w',
'i',
'n',
'e',0};
1859 static const WCHAR test2[] = {0x202B,
'i',
'n', 0x202C,0};
1864 WORD glyphs[4], glyphs2[4], logclust[4], glyphs3[4];
1871 ok(
items[0].
a.fNoGlyphIndex ==
FALSE,
"fNoGlyphIndex TRUE\n");
1886 "Unexpected hr %#lx.\n",
hr);
1887 ok(
items[0].
a.fNoGlyphIndex ==
FALSE,
"fNoGlyphIndex TRUE\n");
1891 ok(
items[0].
a.fNoGlyphIndex ==
FALSE,
"fNoGlyphIndex TRUE\n");
1895 ok(sc2 == sc,
"caches %p, %p not identical\n", sc, sc2);
1898 memset(glyphs,-1,
sizeof(glyphs));
1899 memset(logclust,-1,
sizeof(logclust));
1900 memset(attrs,-1,
sizeof(attrs));
1903 ok(nb == 4,
"Wrong number of items\n");
1904 ok(logclust[0] == 0,
"clusters out of order\n");
1905 ok(logclust[1] == 1,
"clusters out of order\n");
1906 ok(logclust[2] == 2,
"clusters out of order\n");
1907 ok(logclust[3] == 3,
"clusters out of order\n");
1912 ok(attrs[0].fClusterStart == 1,
"fClusterStart incorrect\n");
1913 ok(attrs[1].fClusterStart == 1,
"fClusterStart incorrect\n");
1914 ok(attrs[2].fClusterStart == 1,
"fClusterStart incorrect\n");
1915 ok(attrs[3].fClusterStart == 1,
"fClusterStart incorrect\n");
1916 ok(attrs[0].fDiacritic == 0,
"fDiacritic incorrect\n");
1917 ok(attrs[1].fDiacritic == 0,
"fDiacritic incorrect\n");
1918 ok(attrs[2].fDiacritic == 0,
"fDiacritic incorrect\n");
1919 ok(attrs[3].fDiacritic == 0,
"fDiacritic incorrect\n");
1920 ok(attrs[0].fZeroWidth == 0,
"fZeroWidth incorrect\n");
1921 ok(attrs[1].fZeroWidth == 0,
"fZeroWidth incorrect\n");
1922 ok(attrs[2].fZeroWidth == 0,
"fZeroWidth incorrect\n");
1923 ok(attrs[3].fZeroWidth == 0,
"fZeroWidth incorrect\n");
1928 memset(glyphs2,-1,
sizeof(glyphs2));
1929 memset(glyphs3,-1,
sizeof(glyphs3));
1930 memset(logclust,-1,
sizeof(logclust));
1931 memset(attrs,-1,
sizeof(attrs));
1937 ok(nb == 4,
"Wrong number of items\n");
1938 ok(glyphs2[0] == glyphs3[0],
"Incorrect glyph for 0x202B\n");
1939 ok(glyphs2[3] == glyphs3[3],
"Incorrect glyph for 0x202C\n");
1940 ok(logclust[0] == 0,
"clusters out of order\n");
1941 ok(logclust[1] == 1,
"clusters out of order\n");
1942 ok(logclust[2] == 2,
"clusters out of order\n");
1943 ok(logclust[3] == 3,
"clusters out of order\n");
1948 ok(attrs[0].fClusterStart == 1,
"fClusterStart incorrect\n");
1949 ok(attrs[1].fClusterStart == 1,
"fClusterStart incorrect\n");
1950 ok(attrs[2].fClusterStart == 1,
"fClusterStart incorrect\n");
1951 ok(attrs[3].fClusterStart == 1,
"fClusterStart incorrect\n");
1952 ok(attrs[0].fDiacritic == 0,
"fDiacritic incorrect\n");
1953 ok(attrs[1].fDiacritic == 0,
"fDiacritic incorrect\n");
1954 ok(attrs[2].fDiacritic == 0,
"fDiacritic incorrect\n");
1955 ok(attrs[3].fDiacritic == 0,
"fDiacritic incorrect\n");
1956 ok(attrs[0].fZeroWidth == 0,
"fZeroWidth incorrect\n");
1957 ok(attrs[1].fZeroWidth == 0,
"fZeroWidth incorrect\n");
1958 ok(attrs[2].fZeroWidth == 0,
"fZeroWidth incorrect\n");
1959 ok(attrs[3].fZeroWidth == 0,
"fZeroWidth incorrect\n");
1962 items[0].a.fRTL = 1;
1963 memset(glyphs2,-1,
sizeof(glyphs2));
1964 memset(logclust,-1,
sizeof(logclust));
1965 memset(attrs,-1,
sizeof(attrs));
1968 ok(nb == 4,
"Wrong number of items\n");
1969 ok(glyphs2[0] == glyphs[3],
"Glyphs not reordered properly\n");
1970 ok(glyphs2[1] == glyphs[2],
"Glyphs not reordered properly\n");
1971 ok(glyphs2[2] == glyphs[1],
"Glyphs not reordered properly\n");
1972 ok(glyphs2[3] == glyphs[0],
"Glyphs not reordered properly\n");
1973 ok(logclust[0] == 3,
"clusters out of order\n");
1974 ok(logclust[1] == 2,
"clusters out of order\n");
1975 ok(logclust[2] == 1,
"clusters out of order\n");
1976 ok(logclust[3] == 0,
"clusters out of order\n");
1981 ok(attrs[0].fClusterStart == 1,
"fClusterStart incorrect\n");
1982 ok(attrs[1].fClusterStart == 1,
"fClusterStart incorrect\n");
1983 ok(attrs[2].fClusterStart == 1,
"fClusterStart incorrect\n");
1984 ok(attrs[3].fClusterStart == 1,
"fClusterStart incorrect\n");
1985 ok(attrs[0].fDiacritic == 0,
"fDiacritic incorrect\n");
1986 ok(attrs[1].fDiacritic == 0,
"fDiacritic incorrect\n");
1987 ok(attrs[2].fDiacritic == 0,
"fDiacritic incorrect\n");
1988 ok(attrs[3].fDiacritic == 0,
"fDiacritic incorrect\n");
1989 ok(attrs[0].fZeroWidth == 0,
"fZeroWidth incorrect\n");
1990 ok(attrs[1].fZeroWidth == 0,
"fZeroWidth incorrect\n");
1991 ok(attrs[2].fZeroWidth == 0,
"fZeroWidth incorrect\n");
1992 ok(attrs[3].fZeroWidth == 0,
"fZeroWidth incorrect\n");
1997 for (
i = 0;
i < 2;
i++)
2003 unsigned int item_count;
2043 ok(nb == 1,
"%s: expected 1, got %d\n", lf.
lfFaceName, nb);
2055 ok(nb ==
test_data[
j].item_count,
"%s: [%02x] Got unexpected item count %d.\n",
2059 ok(!
item->a.fNoGlyphIndex,
"%s: [%02x] got unexpected fNoGlyphIndex %#x.\n",
2063 ok(nb == 3,
"%s: [%02x] expected 3, got %d\n", lf.
lfFaceName,
c, nb);
2064 ok(!
item->a.fNoGlyphIndex,
"%s: [%02x] got unexpected fNoGlyphIndex %#x.\n",
2067 ok(glyphs[0] == glyphs2[1] ||
2068 broken(glyphs2[1] ==
c && (
c < 0x10)),
2069 "%s: [%02x] expected %04x, got %04x\n", lf.
lfFaceName,
c, glyphs[0], glyphs2[1]);
2070 ok(attrs[1].fZeroWidth ||
broken(!attrs[1].fZeroWidth && (
c < 0x10) ),
2073 item->a.fNoGlyphIndex = 1;
2076 ok(nb == 3,
"%s: [%02x] expected 1, got %d\n", lf.
lfFaceName,
c, nb);
2078 if (
c == 0x200b ||
c == 0x200c ||
c == 0x200d)
2080 ok(glyphs2[1] == 0x0020,
2081 "%s: [%02x] got unexpected %04x.\n", lf.
lfFaceName,
c, glyphs2[1]);
2082 ok(attrs[1].fZeroWidth,
"%s: [%02x] got unexpected fZeroWidth %#x.\n",
2088 "%s: [%02x] got unexpected %04x.\n", lf.
lfFaceName,
c, glyphs2[1]);
2089 ok(!attrs[1].fZeroWidth,
"%s: [%02x] got unexpected fZeroWidth %#x.\n",
2103 ok(
items[0].
a.eScript > 0,
"Expected script id.\n");
2104 ok(nb == 1,
"Unexpected number of items.\n");
2106 memset(glyphs, 0xff,
sizeof(glyphs));
2109 &
items[0].
a, glyphs, logclust, attrs, &nb);
2111 ok(nb == 1,
"Unexpected glyph count %u\n", nb);
2112 ok(glyphs[0] == 0,
"Unexpected glyph id\n");
2118 static const WCHAR test1[] = {
't',
'e',
's',
't',0};
2119 static const WCHAR test2[] = {0x3044, 0x308d, 0x306f,0};
2124 WORD glyphs[4], logclust[4];
2130 HFONT
hfont, prev_hfont;
2136 ok(
items[0].
a.fNoGlyphIndex ==
FALSE,
"fNoGlyphIndex TRUE\n");
2140 ok(
items[0].
a.fNoGlyphIndex ==
FALSE,
"fNoGlyphIndex TRUE\n");
2149 "Unexpected hr %#lx.\n",
hr);
2158 "Unexpected hr %#lx.\n",
hr);
2162 ok(
items[0].
a.fNoGlyphIndex ==
FALSE,
"fNoGlyphIndex TRUE\n");
2166 ok(sc2 == sc,
"caches %p, %p not identical\n", sc, sc2);
2171 int old_width = widths[0];
2176 ok(widths[0] == 0,
"got width %d\n", widths[0]);
2177 widths[0] = old_width;
2180 skip(
"Glyph already has zero-width - skipping fZeroWidth test\n");
2183 ok(
ret,
"ExtTextOutW should return TRUE\n");
2188 memset(&lf, 0,
sizeof(lf));
2194 ok(
ret,
"GetTextMetrics failed\n");
2196 switch(
tm.tmCharSet) {
2205 ok(
ret,
"GetTextExtentExPoint failed\n");
2207 if (sz.
cx >
len *
tm.tmAveCharWidth)
2211 ok(
items[0].
a.fNoGlyphIndex ==
FALSE,
"fNoGlyphIndex TRUE\n");
2214 memset(glyphs,
'a',
sizeof(glyphs));
2219 memset(widths,
'a',
sizeof(widths));
2223 for (
total = 0,
i = 0;
i < nb;
i++)
2227 ok(widths[
i] >
tm.tmAveCharWidth,
"[%ld] expected greater than %ld, got %d\n",
2228 i,
tm.tmAveCharWidth, widths[
i]);
2234 skip(
"Associated font is unavailable\n");
2239 skip(
"Non-CJK locale\n");
2253 WCHAR TestItem1[] = {
'T',
'e',
's',
't',
'a', 0};
2254 WCHAR TestItem2[] = {
'T',
'e',
's',
't',
'b', 0};
2255 WCHAR TestItem3[] = {
'T',
'e',
's',
't',
'c',
' ',
'1',
'2',
'3',
' ',
' ',
'e',
'n',
'd',0};
2256 WCHAR TestItem4[] = {
'T',
'e',
's',
't',
'd',
' ',0x0684,0x0694,0x06a4,
' ',
' ',
'\r',
'\n',
'e',
'n',
'd',0};
2257 WCHAR TestItem5[] = {0x0684,
'T',
'e',
's',
't',
'e',
' ',0x0684,0x0694,0x06a4,
' ',
' ',
'e',
'n',
'd',0};
2258 WCHAR TestItem6[] = {
'T',
'e',
's',
't',
'f',
' ',
' ',
' ',
'\r',
'\n',
'e',
'n',
'd',0};
2261 unsigned short pwOutGlyphs1[256];
2262 unsigned short pwLogClust[256];
2273 trace(
"number of script properties %d\n", iMaxProps);
2274 ok(iMaxProps > 0,
"Got unexpected script count %d.\n", iMaxProps);
2275 ok(ppSp[0]->
langid == 0,
"Got unexpected langid %#x.\n", ppSp[0]->
langid);
2283 ok(pcItems == 1,
"Got unexpected item count %d.\n", pcItems);
2284 ok(pItem[0].iCharPos == 0,
"Got unexpected character position %d.\n", pItem[0].iCharPos);
2285 ok(pItem[1].iCharPos == cInChars,
"Got unexpected character position %d, expected %d.\n",
2286 pItem[1].iCharPos, cInChars);
2290 &pItem[0].
a, pwOutGlyphs1, pwLogClust, psva, &pcGlyphs);
2294 &pItem[0].
a, pwOutGlyphs1, pwLogClust, psva, &pcGlyphs);
2298 &pItem[0].
a, pwOutGlyphs1, pwLogClust, psva, &pcGlyphs);
2300 ok(!!psc,
"Got unexpected psc %p.\n", psc);
2301 ok(pcGlyphs == cInChars,
"Got unexpected glyph count %d, expected %d.\n", pcGlyphs, cInChars);
2304 memcpy(pwOutGlyphs, pwOutGlyphs1, pcGlyphs *
sizeof(*pwOutGlyphs));
2307 psva, &pItem[0].
a, piAdvance, pGoffset, pABC);
2310 psva, &pItem[0].
a, piAdvance, pGoffset, pABC);
2320 ok(pcItems == 1,
"Got unexpected item count %d.\n", pcItems);
2321 ok(pItem[0].iCharPos == 0,
"Got unexpected character position %d.\n", pItem[0].iCharPos);
2322 ok(pItem[1].iCharPos == cInChars,
"Got unexpected character position %d, expected %d.\n",
2323 pItem[1].iCharPos, cInChars);
2327 &pItem[0].
a, pwOutGlyphs1, pwLogClust, psva, &pcGlyphs);
2329 ok(!!psc,
"Got unexpected psc %p.\n", psc);
2330 ok(pcGlyphs == cInChars,
"Got unexpected glyph count %d, expected %d.\n", pcGlyphs, cInChars);
2332 for (
i = 0;
i < cInChars; ++
i)
2334 ok(pwOutGlyphs1[
i] == TestItem2[
i],
2335 "Got unexpected pwOutGlyphs1[%u] %#x, expected %#x.\n",
2336 i, pwOutGlyphs1[
i], TestItem2[
i]);
2340 psva, &pItem[0].
a, piAdvance, pGoffset, pABC);
2343 ok(!psc,
"Got unexpected psc %p.\n", psc);
2350 ok(pcItems == 3,
"Got unexpected item count %d.\n", pcItems);
2351 ok(pItem[0].iCharPos == 0,
"Got unexpected character position %d.\n", pItem[0].iCharPos);
2352 ok(pItem[1].iCharPos == 6,
"Got unexpected character position %d.\n", pItem[1].iCharPos);
2353 ok(pItem[2].iCharPos == 11,
"Got unexpected character position %d.\n", pItem[2].iCharPos);
2354 ok(pItem[3].iCharPos == cInChars,
"Got unexpected character position %d, expected %d.\n",
2355 pItem[3].iCharPos, cInChars);
2362 ok(pcItems == 5,
"Got unexpected item count %d.\n", pcItems);
2364 ok(pItem[0].iCharPos == 0,
"Got unexpected character position %d.\n", pItem[0].iCharPos);
2365 ok(pItem[1].iCharPos == 6,
"Got unexpected character position %d.\n", pItem[1].iCharPos);
2366 ok(pItem[2].iCharPos == 11,
"Got unexpected character position %d.\n", pItem[2].iCharPos);
2367 ok(pItem[3].iCharPos == 12,
"Got unexpected character position %d.\n", pItem[3].iCharPos);
2368 ok(pItem[4].iCharPos == 13,
"Got unexpected character position %d.\n", pItem[4].iCharPos);
2369 ok(pItem[5].iCharPos == cInChars,
"Got unexpected character position %d, expected %d.\n",
2370 pItem[5].iCharPos, cInChars);
2372 ok(pItem[0].
a.s.uBidiLevel == 0,
"Got unexpected bidi level %u.\n", pItem[0].
a.
s.
uBidiLevel);
2373 ok(pItem[1].
a.s.uBidiLevel == 1,
"Got unexpected bidi level %u.\n", pItem[1].
a.
s.
uBidiLevel);
2374 ok(pItem[2].
a.s.uBidiLevel == 0,
"Got unexpected bidi level %u.\n", pItem[2].
a.
s.
uBidiLevel);
2375 ok(pItem[3].
a.s.uBidiLevel == 0,
"Got unexpected bidi level %u.\n", pItem[3].
a.
s.
uBidiLevel);
2376 ok(pItem[4].
a.s.uBidiLevel == 0,
"Got unexpected bidi level %u.\n", pItem[3].
a.
s.
uBidiLevel);
2381 ok(pcItems == 4,
"Got unexpected item count %d.\n", pcItems);
2382 ok(pItem[0].
a.s.uBidiLevel == 1,
"Got unexpected bidi level %u.\n", pItem[0].
a.
s.
uBidiLevel);
2398 unsigned short pwOutGlyphs2[256];
2399 unsigned short pwOutGlyphs3[256];
2403 static const WCHAR TestItem1[] = {
'T',
'e',
's',
't',
'a', 0};
2404 static const WCHAR TestItem2[] = {0x202B,
'i',
'n', 0x202C,0};
2405 static const WCHAR TestItem3[] = {
'a',
'b',
'c',
'd',
'(',
'<',
'{',
'[',0x2039,0};
2406 static const WCHAR TestItem3b[] = {
'a',
'b',
'c',
'd',
')',
'>',
'}',
']',0x203A,0};
2423 ok( psc ==
NULL,
"Expected psc to be NULL, got %p\n", psc);
2428 ok (
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
2429 ok( psc !=
NULL,
"ScriptGetCMap expected psc to be not NULL\n");
2436 ok( psc ==
NULL,
"Expected psc to be NULL, got %p\n", psc);
2439 ok (
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
2440 ok (psc !=
NULL,
"psc should not be null and have SCRIPT_CACHE buffer address\n");
2442 ok (
cnt == cInChars,
"Translation not correct. WCHAR %d - %04x != %04x\n",
2443 cnt, pwOutGlyphs[
cnt], pwOutGlyphs3[
cnt]);
2446 ok (!psc,
"psc is not null after ScriptFreeCache\n");
2453 if (pwOutGlyphs3[0] == 0 || pwOutGlyphs3[3] == 0)
2458 ok(psc !=
NULL,
"psc should not be null and have SCRIPT_CACHE buffer address\n");
2459 ok(pwOutGlyphs3[0] == pwOutGlyphs2[0],
"expected glyph %d, got %d\n", pwOutGlyphs2[0], pwOutGlyphs3[0]);
2460 ok(pwOutGlyphs3[3] == pwOutGlyphs2[3],
"expected glyph %d, got %d\n", pwOutGlyphs2[3], pwOutGlyphs3[3]);
2465 ok(psc !=
NULL,
"psc should not be null and have SCRIPT_CACHE buffer address\n");
2471 ok(psc !=
NULL,
"psc should not be null and have SCRIPT_CACHE buffer address\n");
2472 ok(pwOutGlyphs3[0] == pwOutGlyphs2[0],
"glyph incorrectly altered\n");
2473 ok(pwOutGlyphs3[1] == pwOutGlyphs2[1],
"glyph incorrectly altered\n");
2474 ok(pwOutGlyphs3[2] == pwOutGlyphs2[2],
"glyph incorrectly altered\n");
2475 ok(pwOutGlyphs3[3] == pwOutGlyphs2[3],
"glyph incorrectly altered\n");
2476 ok(pwOutGlyphs3[4] == pwOutGlyphs2[4],
"glyph not mirrored correctly\n");
2477 ok(pwOutGlyphs3[5] == pwOutGlyphs2[5],
"glyph not mirrored correctly\n");
2478 ok(pwOutGlyphs3[6] == pwOutGlyphs2[6],
"glyph not mirrored correctly\n");
2479 ok(pwOutGlyphs3[7] == pwOutGlyphs2[7],
"glyph not mirrored correctly\n");
2480 ok(pwOutGlyphs3[8] == pwOutGlyphs2[8],
"glyph not mirrored correctly\n");
2483 ok (!psc,
"psc is not null after ScriptFreeCache\n");
2486#define MAX_ENUM_FONTS 4096
2531 HFONT
font, oldfont;
2539 static const WCHAR invalids[] = {0x0020, 0x200B, 0xF71B};
2557 ok( psc ==
NULL,
"Expected psc to be NULL, got %p\n", psc);
2563 ok( psc ==
NULL,
"Expected psc to be NULL, got %p\n", psc);
2575 ok( psc ==
NULL,
"Expected psc to be NULL, got %p\n", psc);
2582 ok( psc !=
NULL,
"Expected a pointer in psc, got NULL\n");
2585 ok( psc ==
NULL,
"Expected psc to be NULL, got %p\n", psc);
2591 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
2592 ok( psc !=
NULL,
"Expected a pointer in psc, got NULL\n");
2598 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
2599 ok( psc == old_psc,
"Expected psc not to be changed, was %p is now %p\n", old_psc, psc);
2601 ok( psc ==
NULL,
"Expected psc to be NULL, got %p\n", psc);
2634 ok(
ret != 0,
"GetTextMetricsA failed!\n");
2639 ok(sfp.
wgBlank == tmA.tmBreakChar || sfp.
wgBlank == gi[0],
"bitmap font %s wgBlank %04x tmBreakChar %04x Space %04x\n",
lf.
lfFaceName, sfp.
wgBlank, tmA.tmBreakChar, gi[0]);
2690 if (gi[2] != 0xFFFF)
2692 else if (gi[1] != 0xFFFF)
2694 else if (gi[0] != 0xFFFF)
2720 WCHAR TestItem1[] = {
'T',
'e',
's',
't',
'a', 0};
2723 unsigned short pwOutGlyphs1[256];
2724 WORD pwLogClust[256];
2740 ok(pcItems == 1,
"Got unexpected item count %d.\n", pcItems);
2741 ok(pItem[0].iCharPos == 0,
"Got unexpected character position %d.\n", pItem[0].iCharPos);
2742 ok(pItem[1].iCharPos == cInChars,
"Got unexpected character position %d, expected %d.\n",
2743 pItem[1].iCharPos, cInChars);
2748 &pItem[0].
a, pwOutGlyphs1, pwLogClust, psva, &pcGlyphs);
2750 ok(!!psc,
"Got unexpected psc %p.\n", psc);
2751 ok(pcGlyphs == cInChars,
"Got unexpected glyph count %d, expected %d.\n", pcGlyphs, cInChars);
2755 psva, &pItem[0].
a, piAdvance, pGoffset, pABC);
2759 ok(!psc,
"Got unexpected psc %p.\n", psc);
2761 hr =
ScriptTextOut(
NULL,
NULL, 0, 0, 0,
NULL,
NULL,
NULL, 0,
NULL, 0,
NULL,
NULL,
NULL);
2765 pwOutGlyphs1, pcGlyphs, piAdvance,
NULL, pGoffset);
2768 hr =
ScriptTextOut(
NULL, &psc, 0, 0, 0,
NULL,
NULL,
NULL, 0,
NULL, 0,
NULL,
NULL,
NULL);
2770 ok(!psc,
"Got unexpected psc %p.\n", psc);
2774 pwOutGlyphs1, pcGlyphs, piAdvance,
NULL, pGoffset);
2776 ok(!psc,
"Got unexpected psc %p.\n", psc);
2778 pwOutGlyphs1, pcGlyphs, piAdvance,
NULL, pGoffset);
2780 ok(!!psc,
"Got unexpected psc %p.\n", psc);
2785 pwOutGlyphs1, pcGlyphs, piAdvance,
NULL, pGoffset);
2788 hr =
ScriptCPtoX(1,
FALSE, cInChars, pcGlyphs, pwLogClust, psva, piAdvance, &pItem[0].
a, &piX);
2795 ok(!psc,
"Got unexpected psc %p.\n", psc);
2808 WCHAR TestItem1[] = {
'T',
'e',
's',
't',
'a', 0};
2811 unsigned short pwOutGlyphs1[256];
2812 WORD pwLogClust[256];
2822 ok(!!
hdc1,
"Failed to create a DC.\n");
2824 ok(!!
hdc2,
"Failed to create a DC.\n");
2832 ok(pcItems == 1,
"Got unexpected item count %d.\n", pcItems);
2833 ok(pItem[0].iCharPos == 0,
"Got unexpected character position %d.\n", pItem[0].iCharPos);
2834 ok(pItem[1].iCharPos == cInChars,
"Got unexpected character position %d, expected %d.\n",
2835 pItem[1].iCharPos, cInChars);
2839 &pItem[0].
a, pwOutGlyphs1, pwLogClust, psva, &pcGlyphs);
2841 ok(!!psc,
"Got unexpected psc %p.\n", psc);
2842 ok(pcGlyphs == cInChars,
"Got unexpected glyph count %d, expected %d.\n", pcGlyphs, cInChars);
2846 psva, &pItem[0].
a, piAdvance, pGoffset, pABC);
2851 ok(
ret,
"Got unexpected ret %#x.\n",
ret);
2857 pwOutGlyphs1, pcGlyphs, piAdvance,
NULL, pGoffset);
2859 ok(!!psc,
"Got unexpected psc %p.\n", psc);
2864 ok(!psc,
"Got unexpected psc %p.\n", psc);
2874 WCHAR TestItem1[] = {
' ',
'\r', 0};
2877 unsigned short pwOutGlyphs1[256];
2878 WORD pwLogClust[256];
2893 ok(pcItems == 2,
"Got unexpected item count %d.\n", pcItems);
2894 ok(pItem[0].iCharPos == 0,
"Got unexpected character position %d.\n", pItem[0].iCharPos);
2895 ok(pItem[1].iCharPos == 1,
"Got unexpected character position %d.\n", pItem[0].iCharPos);
2896 ok(pItem[2].iCharPos == cInChars,
"Got unexpected character position %d, expected %d.\n",
2897 pItem[2].iCharPos, cInChars);
2901 &pItem[0].
a, pwOutGlyphs1, pwLogClust, psva, &pcGlyphs);
2903 ok(!!psc,
"Got unexpected psc %p.\n", psc);
2904 ok(pcGlyphs == cInChars,
"Got unexpected glyph count %d, expected %d.\n", pcGlyphs, cInChars);
2908 psva, &pItem[0].
a, piAdvance, pGoffset, pABC);
2914 pwOutGlyphs1, pcGlyphs, piAdvance,
NULL, pGoffset);
2918 ok(!psc,
"Got unexpected psc %p.\n", psc);
2921#define test_item_ScriptXtoX(a,b,c,d,e,f) (winetest_set_location(__FILE__,__LINE__), 0) ? 0 : _test_item_ScriptXtoX(a,b,c,d,e,f)
2926 int icChars, icGlyphs;
2934 memset(psva,0,
sizeof(psva));
2937 for(iCP = 0; iCP <
cChars; iCP++)
2942 hr =
ScriptXtoCP(iX, icChars, icGlyphs, pwLogClust, psva, piAdvance, psa, &piCP, &piTrailing);
2944 winetest_ok(piCP == iCP,
"ScriptXtoCP: iX=%d should return piCP=%d not %d\n", iX, iCP, piCP);
2945 winetest_ok(piTrailing == 0,
"ScriptXtoCP: iX=%d should return piTrailing=0 not %d\n", iX, piTrailing);
2948 for(iCP = 0; iCP <
cChars; iCP++)
2953 hr =
ScriptXtoCP(iX, icChars, icGlyphs, pwLogClust, psva, piAdvance, psa, &piCP, &piTrailing);
2955 winetest_ok(piCP == iCP,
"ScriptXtoCP leading: iX=%d should return piCP=%d not %d\n", iX, iCP, piCP);
2956 winetest_ok(piTrailing == 0,
"ScriptXtoCP leading: iX=%d should return piTrailing=0 not %d\n", iX, piTrailing);
2959 for(iCP = 0; iCP <
cChars; iCP++)
2964 hr =
ScriptXtoCP(iX, icChars, icGlyphs, pwLogClust, psva, piAdvance, psa, &piCP, &piTrailing);
2966 winetest_ok(piCP == iCP,
"ScriptXtoCP trailing: iX=%d should return piCP=%d not %d\n", iX, iCP, piCP);
2967 winetest_ok(piTrailing == 1,
"ScriptXtoCP trailing: iX=%d should return piTrailing=1 not %d\n", iX, piTrailing);
2970 for(iCP = 0; iCP <=
cChars+1; iCP++)
2975 hr =
ScriptCPtoX(iCP, fTrailing, icChars, icGlyphs, pwLogClust, psva, piAdvance, psa, &piX);
2978 "ScriptCPtoX: iCP=%d should return piX=%d not %d\n", iCP,
offsets[iCP], piX);
2981 for(iCP = 0; iCP <=
cChars+1; iCP++)
2986 hr =
ScriptCPtoX(iCP, fTrailing, icChars, icGlyphs, pwLogClust, psva, piAdvance, psa, &piX);
2989 "ScriptCPtoX trailing: iCP=%d should return piX=%d not %d\n", iCP,
offsets[iCP+1], piX);
2993#define test_caret_item_ScriptXtoCP(a,b,c,d,e,f) _test_caret_item_ScriptXtoCP(__LINE__,a,b,c,d,e,f)
2998 int icChars, icGlyphs;
3006 memset(psva,0,
sizeof(psva));
3009 for(iX = -1,
i = iCP = 0;
i <
cChars;
i++)
3018 hr =
ScriptXtoCP(iX, icChars, icGlyphs, pwLogClust, psva, piAdvance, psa, &piCP, &piTrailing);
3020 ok_(__FILE__,
line)(piCP == iCP,
"ScriptXtoCP: iX=%d should return piCP=%d not %d\n", iX, iCP, piCP);
3021 ok_(__FILE__,
line)(piTrailing == 0,
"ScriptXtoCP: iX=%d should return piTrailing=0 not %d\n", iX, piTrailing);
3033 hr =
ScriptXtoCP(iX, icChars, icGlyphs, pwLogClust, psva, piAdvance, psa, &piCP, &piTrailing);
3035 ok_(__FILE__,
line)(piCP == iCP,
"ScriptXtoCP leading: iX=%d should return piCP=%d not %d\n", iX, iCP, piCP);
3036 ok_(__FILE__,
line)(piTrailing == 0,
"ScriptXtoCP leading: iX=%d should return piTrailing=0 not %d\n", iX, piTrailing);
3039 for(clusterSize = 0, iCP = 0, iX = -2,
i = 0;
i <
cChars;
i++)
3047 hr =
ScriptXtoCP(iX, icChars, icGlyphs, pwLogClust, psva, piAdvance, psa, &piCP, &piTrailing);
3049 ok_(__FILE__,
line)(piCP == iCP,
"ScriptXtoCP trailing: iX=%d should return piCP=%d not %d\n", iX, iCP, piCP);
3050 ok_(__FILE__,
line)(piTrailing == clusterSize,
"ScriptXtoCP trailing: iX=%d should return piTrailing=%d not %d\n", iX, clusterSize, piTrailing);
3062 WORD pwLogClust[10] = {0, 0, 0, 1, 1, 2, 2, 3, 3, 3};
3063 WORD pwLogClust_RTL[10] = {3, 3, 3, 2, 2, 1, 1, 0, 0, 0};
3064 WORD pwLogClust_2[7] = {4, 3, 3, 2, 1, 0 ,0};
3065 WORD pwLogClust_3[17] = {0, 1, 1, 1, 1, 4, 5, 6, 6, 8, 8, 8, 8, 11, 11, 13, 13};
3066 WORD pwLogClust_3_RTL[17] = {13, 13, 11, 11, 8, 8, 8, 8, 6, 6, 5, 4, 1, 1, 1, 1, 0};
3067 int piAdvance[10] = {201, 190, 210, 180, 170, 204, 189, 195, 212, 203};
3068 int piAdvance_2[5] = {39, 26, 19, 17, 11};
3069 int piAdvance_3[15] = {6, 6, 0, 0, 10, 5, 10, 0, 12, 0, 0, 9, 0, 10, 0};
3070 static const int offsets[13] = {0, 67, 134, 201, 296, 391, 496, 601, 1052, 1503, 1954, 1954, 1954};
3071 static const int offsets_RTL[13] = {781, 721, 661, 601, 496, 391, 296, 201, 134, 67, 0, 0, 0};
3072 static const int offsets_2[10] = {112, 101, 92, 84, 65, 39, 19, 0, 0, 0};
3074 static const int offsets_3[19] = {0, 6, 6, 6, 6, 12, 22, 27, 27, 37, 37, 37, 37, 49, 49, 58, 58, 68, 68};
3075 static const int offsets_3_RTL[19] = {68, 68, 58, 58, 49, 49, 49, 49, 37, 37, 27, 22, 12, 12, 12, 12, 6, 6};
3084 static const WCHAR hebrW[] = { 0x5be, 0};
3085 static const WCHAR thaiW[] = { 0xe2a, 0};
3089 memset(psva, 0,
sizeof(psva));
3092 hr =
ScriptXtoCP(-1, 10, 10, pwLogClust, psva, piAdvance, &
sa, &piCP, &piTrailing);
3095 ok(piCP == -1,
"Negative iX should return piCP=-1 not %d\n", piCP);
3097 ok(piCP == 10,
"Negative iX should return piCP=10 not %d\n", piCP);
3099 for (iX = 0; iX <= 7; iX++)
3105 ok(piCP==0 && piTrailing==0,
"%i should return 0(%i) and 0(%i)\n",iX, piCP,piTrailing);
3107 for (iX = 8; iX < 16; iX++)
3113 ok(piCP==0 && piTrailing==1,
"%i should return 0(%i) and 1(%i)\n",iX, piCP,piTrailing);
3117 hr =
ScriptXtoCP(-1, 10, 10, pwLogClust_RTL, psva, piAdvance, &
sa, &piCP, &piTrailing);
3120 ok(piCP == -1,
"Negative iX should return piCP=-1 not %d\n", piCP);
3122 ok(piCP == 10,
"Negative iX should return piCP=10 not %d\n", piCP);
3125 hr =
ScriptXtoCP(1954, 10, 10, pwLogClust_RTL, psva, piAdvance, &
sa, &piCP, &piTrailing);
3127 ok(piCP == -1,
"iX=%d should return piCP=-1 not %d\n", iX, piCP);
3128 ok(piTrailing == 1,
"iX=%d should return piTrailing=1 not %d\n", iX, piTrailing);
3130 for (iX = 1; iX <= 8; iX++)
3136 ok(piCP==0 && piTrailing==1,
"%i should return 0(%i) and 1(%i)\n",iX,piCP,piTrailing);
3138 for (iX = 9; iX < 16; iX++)
3144 ok(piCP==0 && piTrailing==0,
"%i should return 0(%i) and 0(%i)\n",iX,piCP,piTrailing);
3156 ok(
i == 1,
"got %d\n",
i);
3164 ok(
i == 1,
"got %d\n",
i);
3173 hr =
ScriptXtoCP(0, 17, 15, pwLogClust_3_RTL, psva, piAdvance_3, &
sa, &piCP, &piTrailing);
3175 ok(piCP == 16,
"ScriptXtoCP: iX=0 should return piCP=16 not %d\n", piCP);
3176 ok(piTrailing == 1,
"ScriptXtoCP: iX=0 should return piTrailing=1 not %d\n", piTrailing);
3179 win_skip(
"Uniscribe version too old to test Hebrew clusters\n");
3192 WCHAR teststr[] = {
'T',
'e',
's',
't',
'1',
' ',
'a',
'2',
'b',
'3',
'\0'};
3194 int Glyphs =
len * 2 + 16;
3197 static const int Dx[
ARRAY_SIZE(teststr) - 1];
3204 const RECT rc = {0, 50, 100, 100};
3208 const int *clip_len;
3232 ok(!!ssa,
"Got unexpected ssa %p.\n", ssa);
3238 ok(*clip_len ==
len,
"Got unexpected *clip_len %d, expected %d.\n", *clip_len,
len);
3244 for (
i = 0;
i < *clip_len; ++
i)
3260 static const WCHAR teststr1[] = {0x05e9,
'i', 0x05dc,
'n', 0x05d5,
'e', 0x05dd,
'.',0};
3261 static const BOOL rtl[] = {1, 0, 1, 0, 1, 0, 1, 0};
3262 unsigned int String_len =
ARRAY_SIZE(teststr1) - 1;
3263 int Glyphs = String_len * 2 + 16;
3279 "Got unexpected hr %#lx.\n",
hr);
3282 ok(!!ssa,
"Got unexpected ssa %p.\n", ssa);
3286 for (Cp = 0; Cp < String_len; ++Cp)
3298 ok(
rtl[Cp] ? lead > trail : lead < trail,
3299 "Got unexpected lead %d, trail %d, for rtl[%u] %u.\n",
3300 lead, trail, Cp,
rtl[Cp]);
3307 X =
rtl[Cp] ? lead - 1 : lead + 1;
3310 ok(
Ch == Cp,
"Got unexpected Ch %d for X %d, expected %d.\n",
Ch,
X, Cp);
3311 ok(!iTrailing,
"Got unexpected iTrailing %#x for X %d.\n", iTrailing,
X);
3314 X =
rtl[Cp] ? trail + 1 : trail - 1;
3317 ok(
Ch == Cp,
"Got unexpected Ch %d for X %d, expected %d.\n",
Ch,
X, Cp);
3318 ok(iTrailing,
"Got unexpected iTrailing %#x for X %d.\n", iTrailing,
X);
3321 if (Cp < String_len - 1)
3323 X =
rtl[Cp] ? lead + 1 : trail + 1;
3326 ok(
Ch == Cp + 1,
"Got unexpected Ch %d for X %d, expected %d.\n",
Ch,
X, Cp + 1);
3327 ok(iTrailing == !!
rtl[Cp + 1],
"Got unexpected iTrailing %#x for X %d, expected %#x.\n",
3328 iTrailing,
X, !!
rtl[Cp + 1]);
3334 X =
rtl[Cp] ? trail - 1 : lead - 1;
3337 ok(
Ch == Cp - 1,
"Got unexpected Ch %d for X %d, expected %d.\n",
Ch,
X, Cp - 1);
3338 ok(iTrailing == !
rtl[Cp - 1],
"Got unexpected iTrailing %#x for X %d, expected %#x.\n",
3339 iTrailing,
X, !
rtl[Cp - 1]);
3353 ok(
Ch == 1,
"Got unexpected Ch %d.\n",
Ch);
3354 ok(!iTrailing,
"Got unexpected iTrailing %#x.\n", iTrailing);
3363 ok(
Ch == -1,
"Got unexpected Ch %d.\n",
Ch);
3364 ok(iTrailing,
"Got unexpected iTrailing %#x.\n", iTrailing);
3368 if (
rtl[String_len - 1])
3381 ok(
Ch == String_len,
"Got unexpected Ch %d, expected %d.\n",
Ch, String_len);
3382 ok(!iTrailing,
"Got unexpected iTrailing %#x.\n", iTrailing);
3405 HWND hwnd =
CreateWindowExA(0,
"Static",
"",
WS_POPUP, 0, 0, 100, 100, 0, 0, 0,
NULL);
3406 ok(
hwnd !=
NULL,
"Failed to create test window.\n");
3416 HFONT
hfont, prev_hfont;
3437 ok(
height == 123,
"Unexpected height.\n");
3441 ok(
tm.tmHeight > 0,
"Unexpected tmHeight %lu.\n",
tm.tmHeight);
3446 ok(
height ==
tm.tmHeight,
"expected height > 0\n");
3452 ok(height2 ==
height,
"Unexpected height %lu.\n", height2);
3457 ok(
hdc2 !=
NULL,
"Failed to get window dc.\n");
3470 ok(
tm.tmHeight >
height,
"Unexpected tmHeight %lu.\n",
tm.tmHeight);
3475 ok(height2 ==
height,
"Unexpected height.\n");
3490 HFONT
hfont, prev_hfont;
3500 ok(
ret == 1,
"Failed to get glyph index.\n");
3501 ok(glyph != 0,
"Unexpected glyph index.\n");
3509 "Unexpected hr %#lx.\n",
hr);
3521 ok(abc.
abcB != 0,
"Unexpected width.\n");
3524 ok(
ret,
"Failed to get char width.\n");
3525 ok(!
memcmp(&abc, &abc2,
sizeof(abc)),
"Unexpected width.\n");
3538 ok(
ret,
"Failed to get text metrics.\n");
3544 ok(
ret == 1,
"Failed to get glyph index.\n");
3545 ok(glyph != 0,
"Unexpected glyph index.\n");
3550 ok(abc.
abcB != 0,
"Unexpected width.\n");
3553 ok(
ret,
"Failed to get char width.\n");
3556 ok(!
memcmp(&abc, &abc2,
sizeof(abc)),
"Unexpected width.\n");
3569 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
3570 { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
3571 { 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 },
3572 { 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 },
3574 { 0, 0, 0, 0, 0, 1, 1, 1, 1, 1},
3575 { 1, 1, 1, 2, 2, 2, 1, 1, 1, 1 },
3576 { 2, 2, 2, 1, 1, 1, 2, 2, 2, 2 },
3577 { 0, 0, 1, 1, 2, 2, 1, 1, 0, 0 },
3578 { 1, 1, 2, 2, 3, 3, 2, 2, 1, 1 },
3580 { 0, 0, 1, 1, 2, 2, 1, 1, 0, 1 },
3581 { 1, 0, 1, 2, 2, 1, 2, 1, 0, 1 },
3583 { 1, 2, 0, 0, 0, 0, 0, 0, 0, 0 },
3584 { 2, 2, 2, 0, 0, 0, 0, 0, 0, 0 },
3585 { 2, 2, 2, 4, 4, 4, 1, 1, 0, 0 },
3586 { 1, 2, 3, 0, 3, 2, 1, 0, 0, 0 }
3588 static const int expect_l2v[][10] =
3590 { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 },
3591 { 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 },
3592 { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 },
3593 { 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 },
3595 { 0, 1, 2, 3, 4, 9, 8 ,7 ,6, 5},
3596 { 9, 8, 7, 4, 5, 6, 3 ,2 ,1, 0},
3597 { 7, 8, 9, 6, 5, 4, 0 ,1 ,2, 3},
3598 { 0, 1, 7, 6, 4, 5, 3 ,2 ,8, 9},
3599 { 9, 8, 2, 3, 5, 4, 6 ,7 ,1, 0},
3601 { 0, 1, 7, 6, 4, 5, 3 ,2 ,8, 9},
3602 { 0, 1, 7, 5, 6, 4, 3 ,2 ,8, 9},
3604 { 1, 0, 2, 3, 4, 5, 6, 7, 8, 9},
3605 { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9},
3606 { 2, 3, 4, 5, 6, 7, 1, 0, 8, 9},
3607 { 2, 0, 1, 3, 5, 6, 4, 7, 8, 9}
3609 static const int expect_v2l[][10] =
3611 { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 },
3612 { 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 },
3613 { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 },
3614 { 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 },
3616 { 0, 1, 2, 3, 4, 9, 8 ,7 ,6, 5},
3617 { 9, 8, 7, 6, 3, 4, 5 ,2 ,1, 0},
3618 { 6, 7, 8, 9, 5, 4, 3 ,0 ,1, 2},
3619 { 0, 1, 7, 6, 4, 5, 3 ,2 ,8, 9},
3620 { 9, 8, 2, 3, 5, 4, 6 ,7 ,1, 0},
3622 { 0, 1, 7, 6, 4, 5, 3 ,2 ,8, 9},
3623 { 0, 1, 7, 6, 5, 3, 4 ,2 ,8, 9},
3625 { 1, 0, 2, 3, 4, 5, 6, 7, 8, 9},
3626 { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9},
3627 { 7, 6, 0, 1, 2, 3, 4, 5, 8, 9},
3628 { 1, 2, 0, 3, 6, 4, 5, 7, 8, 9}
3631 int i,
j, vistolog[
sizeof(
levels[0])], logtovis[
sizeof(
levels[0])];
3646 ok(expect_v2l[
i][
j] == vistolog[
j],
3647 "failure: levels[%d][%d] = %d, vistolog[%d] = %d\n",
3653 ok(expect_l2v[
i][
j] == logtovis[
j],
3654 "failure: levels[%d][%d] = %d, logtovis[%d] = %d\n",
3670 memset(&sds, 0,
sizeof(sds));
3671 memset(&sc, 0,
sizeof(sc));
3715 ok(
ret,
"EnumLanguageGroupLocalesA failed unexpectedly: %lu\n",
GetLastError());
3740 static const WCHAR test[] = {
' ',
'\r',
'\n',0};
3761 memset(&la, 0,
sizeof(la));
3772 memset(&la, 0,
sizeof(la));
3783 memset(&la, 0,
sizeof(la));
3797 static const WCHAR test1[] = {
't',
'e',
'x',
't',
'\r',
't',
'e',
'x',
't',0};
3798 static const WCHAR test2[] = {
't',
'e',
'x',
't',
'\n',
't',
'e',
'x',
't',0};
3799 static const WCHAR test3[] = {
't',
'e',
'x',
't',
'\r',
'\n',
't',
'e',
'x',
't',0};
3800 static const WCHAR test4[] = {
't',
'e',
'x',
't',
'\n',
'\r',
't',
'e',
'x',
't',0};
3801 static const WCHAR test5[] = {
'1',
'2',
'3',
'4',
'\n',
'\r',
'1',
'2',
'3',
'4',0};
3834 static const WCHAR test_phagspa[] = {0xa84f, 0xa861, 0xa843, 0x0020, 0xa863, 0xa861, 0xa859,
3835 0x0020, 0xa850, 0xa85c, 0xa85e};
3846 ok(!sc,
"Got unexpected script cache %p.\n", sc);
3849 ok(!sc,
"Got unexpected script cache %p.\n", sc);
3852 ok(!sc,
"Got unexpected script cache %p.\n", sc);
3855 ok(!sc,
"Got unexpected script cache %p.\n", sc);
3858 ok(!sc,
"Got unexpected script cache %p.\n", sc);
3865 ok(!!sc,
"Got unexpected script cache %p.\n", sc);
3872 ok(!sc,
"Got unexpected script cache %p.\n", sc);
3875 ok(!sc,
"Got unexpected script cache %p.\n", sc);
3878 ok(!sc,
"Got unexpected script cache %p.\n", sc);
3881 ok(!sc,
"Got unexpected script cache %p.\n", sc);
3884 ok(!sc,
"Got unexpected script cache %p.\n", sc);
3897 ok(!sc,
"Got unexpected script cache %p.\n", sc);
3900 ok(!sc,
"Got unexpected script cache %p.\n", sc);
3903 ok(!sc,
"Got unexpected script cache %p.\n", sc);
3906 ok(!sc,
"Got unexpected script cache %p.\n", sc);
3909 ok(!sc,
"Got unexpected script cache %p.\n", sc);
3955 { 3, 3, { 6, 9, 12 }, { 0, 1, 2 }, { 6, 9, 12 }, { 1, 1, 1 } },
3956 { 3, 3, { 6, 9, 12 }, { 0, 1, 2 }, { 6, 9, 12 }, { 1, 1, 1 }, { 1, 0, 0 } },
3957 { 3, 3, { 6, 9, 12 }, { 0, 1, 2 }, { 6, 9, 12 }, { 1, 1, 1 }, { 0 }, { 1, 1, 1 } },
3958 { 3, 3, { 6, 9, 12 }, { 0, 1, 2 }, { 27, 21, 12 }, { 0, 0, 0 }, { 0 }, { 0 },
TRUE },
3959 { 3, 3, { 6, 9, 12 }, { 0, 1, 2 }, { 6, 21, 12 }, { 0, 1, 0 }, { 0 }, { 0 },
TRUE },
3960 { 3, 3, { 6, 9, 12 }, { 0, 1, 2 }, { 6, 21, 12 }, { 1, 1, 0 }, { 0 }, { 0 },
TRUE },
3961 { 3, 3, { 6, 9, 12 }, { 0, 2, 2 }, { 15, 6, 6 }, { 1, 0, 1 } },
3976 memset(attrs, 0,
sizeof(attrs));
3977 for (
j = 0;
j <
ptr->glyph_count;
j++)
3994 static const WCHAR testW[] = {0x202a,
'1',0x202c,0};
3995 static const WCHAR test2W[] = {
'1',0};
3996 static const struct complex_test
4034 ok(
hr == complex_tests[
i].
hr,
"%u: got %#lx, expected %#lx, flags %#lx.\n",
i,
hr, complex_tests[
i].
hr,
4063 hr =
ScriptStringAnalyse(
hdc,
textW, 1, 16, -1,
SSA_GLYPHS, 0,
NULL,
NULL,
NULL,
NULL,
NULL, &ssa);
4073 ok(
tm.tmHeight > 0,
"Unexpected tmHeight.\n");
4076 ok(
size !=
NULL,
"Unexpected size pointer.\n");
4078 ok(
size->cy ==
tm.tmHeight,
"Unexpected cy size %ld.\n",
size->cy);
4090 HFONT hfont1, hfont2;
4091 HFONT prev_hfont1, prev_hfont2;
4108 ok(hfont1 !=
NULL,
"CreateFontIndirectA failed\n");
4110 ok(hfont2 !=
NULL,
"CreateFontIndirectA failed\n");
4111 ok(hfont1 != hfont2,
"Expected fonts %p and %p to differ\n", hfont1, hfont2);
4114 ok(prev_hfont1 !=
NULL,
"SelectObject failed: %p\n", prev_hfont1);
4116 ok(prev_hfont2 !=
NULL,
"SelectObject failed: %p\n", prev_hfont2);
4121 ok(sc !=
NULL,
"Script cache is NULL\n");
4127 ok(sc2 !=
NULL,
"Script cache is NULL\n");
4128 ok(sc == sc2,
"Expected caches %p, %p to be identical\n", sc, sc2);
4135 ok(sc2 !=
NULL,
"Script cache is NULL\n");
4136 ok(sc == sc2,
"Expected caches %p, %p to be identical\n", sc, sc2);
4146 ok(sc2 !=
NULL,
"Script cache is NULL\n");
4147 ok(sc == sc2,
"Expected caches %p, %p to be identical\n", sc, sc2);
4153 ok(sc2 !=
NULL,
"Script cache is NULL\n");
4154 ok(sc == sc2,
"Expected caches %p, %p to be identical\n", sc, sc2);
4163 ok(hfont2 !=
NULL,
"CreateFontIndirectA failed\n");
4170 ok(sc2 !=
NULL,
"Script cache is NULL\n");
4171 ok(sc != sc2,
"Expected caches %p, %p to be different\n", sc, sc2);
4177 ok(sc2 !=
NULL,
"Script cache is NULL\n");
4178 ok(sc != sc2,
"Expected caches %p, %p to be different\n", sc, sc2);
4197 unsigned short pwOutGlyphs[256];
4208 ok(
hdc !=
NULL,
"HDC failed to be created %p\n",
hdc);
_STLP_MOVE_TO_STD_NAMESPACE void _STLP_CALL advance(_InputIterator &__i, _Distance __n)
static struct sockaddr_in sa
_In_ D3DDDI_VIDEO_PRESENT_TARGET_ID _In_ ULONG _In_ ULONG Flags
#define HeapFree(x, y, z)
static void cleanup(void)
LCID WINAPI GetThreadLocale(void)
BOOL WINAPI SetThreadLocale(LCID lcid)
LANGID WINAPI GetSystemDefaultLangID(void)
int WINAPI lstrcmpA(LPCSTR str1, LPCSTR str2)
BOOL WINAPI IsValidLocale(LCID lcid, DWORD flags)
BOOL WINAPI EnumLanguageGroupLocalesA(LANGGROUPLOCALE_ENUMPROCA pLangGrpLcEnumProc, LGRPID lgrpid, DWORD dwFlags, LONG_PTR lParam)
_ACRTIMP int __cdecl memcmp(const void *, const void *, size_t)
_ACRTIMP size_t __cdecl strlen(const char *)
HRESULT WINAPI ScriptPlace(HDC hdc, SCRIPT_CACHE *psc, const WORD *pwGlyphs, int cGlyphs, const SCRIPT_VISATTR *psva, SCRIPT_ANALYSIS *psa, int *piAdvance, GOFFSET *pGoffset, ABC *pABC)
HRESULT WINAPI ScriptGetFontScriptTags(HDC hdc, SCRIPT_CACHE *psc, SCRIPT_ANALYSIS *psa, int cMaxTags, OPENTYPE_TAG *pScriptTags, int *pcTags)
HRESULT WINAPI ScriptStringFree(SCRIPT_STRING_ANALYSIS *pssa)
HRESULT WINAPI ScriptGetFontFeatureTags(HDC hdc, SCRIPT_CACHE *psc, SCRIPT_ANALYSIS *psa, OPENTYPE_TAG tagScript, OPENTYPE_TAG tagLangSys, int cMaxTags, OPENTYPE_TAG *pFeatureTags, int *pcTags)
HRESULT WINAPI ScriptShapeOpenType(HDC hdc, SCRIPT_CACHE *psc, SCRIPT_ANALYSIS *psa, OPENTYPE_TAG tagScript, OPENTYPE_TAG tagLangSys, int *rcRangeChars, TEXTRANGE_PROPERTIES **rpRangeProperties, int cRanges, const WCHAR *pwcChars, int cChars, int cMaxGlyphs, WORD *pwLogClust, SCRIPT_CHARPROP *pCharProps, WORD *pwOutGlyphs, SCRIPT_GLYPHPROP *pOutGlyphProps, int *pcGlyphs)
HRESULT WINAPI ScriptCacheGetHeight(HDC hdc, SCRIPT_CACHE *psc, LONG *height)
HRESULT WINAPI ScriptGetCMap(HDC hdc, SCRIPT_CACHE *psc, const WCHAR *pwcInChars, int cChars, DWORD dwFlags, WORD *pwOutGlyphs)
HRESULT WINAPI ScriptFreeCache(SCRIPT_CACHE *psc)
HRESULT WINAPI ScriptItemize(const WCHAR *pwcInChars, int cInChars, int cMaxItems, const SCRIPT_CONTROL *psControl, const SCRIPT_STATE *psState, SCRIPT_ITEM *pItems, int *pcItems)
HRESULT WINAPI ScriptXtoCP(int iX, int cChars, int cGlyphs, const WORD *pwLogClust, const SCRIPT_VISATTR *psva, const int *piAdvance, const SCRIPT_ANALYSIS *psa, int *piCP, int *piTrailing)
HRESULT WINAPI ScriptGetLogicalWidths(const SCRIPT_ANALYSIS *sa, int nbchars, int nbglyphs, const int *advances, const WORD *log_clust, const SCRIPT_VISATTR *sva, int *widths)
HRESULT WINAPI ScriptShape(HDC hdc, SCRIPT_CACHE *psc, const WCHAR *pwcChars, int cChars, int cMaxGlyphs, SCRIPT_ANALYSIS *psa, WORD *pwOutGlyphs, WORD *pwLogClust, SCRIPT_VISATTR *psva, int *pcGlyphs)
HRESULT WINAPI ScriptLayout(int runs, const BYTE *level, int *vistolog, int *logtovis)
HRESULT WINAPI ScriptStringAnalyse(HDC hdc, const void *pString, int cString, int cGlyphs, int iCharset, DWORD dwFlags, int iReqWidth, SCRIPT_CONTROL *psControl, SCRIPT_STATE *psState, const int *piDx, SCRIPT_TABDEF *pTabdef, const BYTE *pbInClass, SCRIPT_STRING_ANALYSIS *pssa)
HRESULT WINAPI ScriptStringOut(SCRIPT_STRING_ANALYSIS ssa, int iX, int iY, UINT uOptions, const RECT *prc, int iMinSel, int iMaxSel, BOOL fDisabled)
HRESULT WINAPI ScriptGetFontProperties(HDC hdc, SCRIPT_CACHE *psc, SCRIPT_FONTPROPERTIES *sfp)
const SIZE *WINAPI ScriptString_pSize(SCRIPT_STRING_ANALYSIS ssa)
HRESULT WINAPI ScriptGetProperties(const SCRIPT_PROPERTIES ***props, int *num)
HRESULT WINAPI ScriptStringGetOrder(SCRIPT_STRING_ANALYSIS ssa, UINT *order)
HRESULT WINAPI ScriptItemizeOpenType(const WCHAR *pwcInChars, int cInChars, int cMaxItems, const SCRIPT_CONTROL *psControl, const SCRIPT_STATE *psState, SCRIPT_ITEM *pItems, OPENTYPE_TAG *pScriptTags, int *pcItems)
const int *WINAPI ScriptString_pcOutChars(SCRIPT_STRING_ANALYSIS ssa)
HRESULT WINAPI ScriptStringXtoCP(SCRIPT_STRING_ANALYSIS ssa, int iX, int *piCh, int *piTrailing)
HRESULT WINAPI ScriptStringCPtoX(SCRIPT_STRING_ANALYSIS ssa, int icp, BOOL fTrailing, int *pX)
HRESULT WINAPI ScriptApplyDigitSubstitution(const SCRIPT_DIGITSUBSTITUTE *sds, SCRIPT_CONTROL *sc, SCRIPT_STATE *ss)
HRESULT WINAPI ScriptRecordDigitSubstitution(LCID locale, SCRIPT_DIGITSUBSTITUTE *sds)
HRESULT WINAPI ScriptIsComplex(const WCHAR *chars, int len, DWORD flag)
HRESULT WINAPI ScriptGetFontLanguageTags(HDC hdc, SCRIPT_CACHE *psc, SCRIPT_ANALYSIS *psa, OPENTYPE_TAG tagScript, int cMaxTags, OPENTYPE_TAG *pLangSysTags, int *pcTags)
HRESULT WINAPI ScriptCPtoX(int iCP, BOOL fTrailing, int cChars, int cGlyphs, const WORD *pwLogClust, const SCRIPT_VISATTR *psva, const int *piAdvance, const SCRIPT_ANALYSIS *psa, int *piX)
HRESULT WINAPI ScriptBreak(const WCHAR *chars, int count, const SCRIPT_ANALYSIS *sa, SCRIPT_LOGATTR *la)
HRESULT WINAPI ScriptGetGlyphABCWidth(HDC hdc, SCRIPT_CACHE *psc, WORD glyph, ABC *abc)
HRESULT WINAPI ScriptTextOut(const HDC hdc, SCRIPT_CACHE *psc, int x, int y, UINT fuOptions, const RECT *lprc, const SCRIPT_ANALYSIS *psa, const WCHAR *pwcReserved, int iReserved, const WORD *pwGlyphs, int cGlyphs, const int *piAdvance, const int *piJustify, const GOFFSET *pGoffset)
#define check(expected, result)
@ SCRIPT_JUSTIFY_ARABIC_SEEN
@ SCRIPT_JUSTIFY_ARABIC_NORMAL
@ SCRIPT_JUSTIFY_CHARACTER
static const FxOffsetAndName offsets[]
GLint GLint GLint GLint GLint x
GLuint GLuint GLsizei count
GLint GLint GLsizei GLsizei height
GLuint GLuint GLsizei GLenum type
GLint GLint GLsizei width
GLuint GLdouble GLdouble GLint GLint order
GLboolean GLboolean GLboolean GLboolean a
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
LPSTR WINAPI lstrcpyA(LPSTR lpString1, LPCSTR lpString2)
void __cdecl winetest_ok(int condition, const char *msg,...) __WINE_PRINTF_ATTR(2
void __cdecl void __cdecl winetest_skip(const char *msg,...) __WINE_PRINTF_ATTR(1
void __cdecl void __cdecl void __cdecl winetest_win_skip(const char *msg,...) __WINE_PRINTF_ATTR(1
#define todo_wine_if(is_todo)
void __cdecl void __cdecl void __cdecl void __cdecl winetest_trace(const char *msg,...) __WINE_PRINTF_ATTR(1
#define memcpy(s1, s2, n)
static const WCHAR textW[]
static CRYPT_DATA_BLOB b2[]
static WORD system_lang_id
static CHAR string2[MAX_PATH]
static const WCHAR testW[]
struct _shapeTest_glyph shapeTest_glyph
#define find_font_for_range(a, b, c, d, e, f, g)
#define test_items_ok(a, b, c, d, e, f, g, h)
static HWND create_test_window(void)
static void test_ScriptCacheGetHeight(HDC hdc)
#define test_shape_ok_valid(v, a, b, c, d, e, f, g, h, i)
static void test_ScriptShape(HDC hdc)
static void test_ScriptString_pSize(HDC hdc)
static void test_ScriptGetFontProperties(HDC hdc)
static void test_ScriptIsComplex(void)
static INT CALLBACK enum_bitmap_font_proc(const LOGFONTA *lf, const TEXTMETRICA *ntm, DWORD type, LPARAM lParam)
static void test_ScriptGetGlyphABCWidth(HDC hdc)
static void test_ScriptGetProperties(void)
static void test_ScriptItemize(void)
static void _test_caret_item_ScriptXtoCP(int line, SCRIPT_ANALYSIS *psa, int cChars, int cGlyphs, const int *offsets, const WORD *pwLogClust, const int *piAdvance)
struct _shapeTest_char shapeTest_char
static void test_ScriptBreak(void)
static void test_ScriptItemIzeShapePlace(HDC hdc, unsigned short pwOutGlyphs[256])
static int _find_font_for_range(HDC hdc, const CHAR *recommended, BYTE range, const WCHAR check, HFONT *hfont, HFONT *origFont, const font_fingerprint *fingerprint)
static void _test_item_ScriptXtoX(SCRIPT_ANALYSIS *psa, int cChars, int cGlyphs, const int *offsets, const WORD *pwLogClust, const int *piAdvance)
#define test_shape_ok_valid_props2(v, a, b, c, d, e, f, g, h, i, j)
static void test_digit_substitution(void)
static void make_surrogate(DWORD i, WORD out[2])
static void test_ScriptXtoX(void)
static void test_ScriptString(HDC hdc)
static void test_ScriptGetFontFunctions(HDC hdc)
struct _font_fingerprint font_fingerprint
static void test_ScriptItemize_surrogates(void)
static int CALLBACK enumFontProc(const LOGFONTA *lpelfe, const TEXTMETRICA *lpntme, DWORD FontType, LPARAM lParam)
struct tagRangeP fontEnumParam
static void test_ScriptGetCMap(HDC hdc, unsigned short pwOutGlyphs[256])
struct _itemTest itemTest
static void test_ScriptPlace(HDC hdc)
static void test_ScriptGetLogicalWidths(void)
static INT CALLBACK enum_truetype_proc(const LOGFONTA *lf, const TEXTMETRICA *ntm, DWORD type, LPARAM lParam)
static void test_ScriptTextOut2(HDC hdc)
static void test_script_cache_reuse(void)
static void test_ScriptLayout(void)
static BOOL CALLBACK enum_proc(LGRPID group, LCID lcid, LPSTR locale, LONG_PTR lparam)
static void test_newlines(void)
static void test_ScriptShapeOpenType(HDC hdc)
static void _test_shape_ok(int valid, HDC hdc, LPCWSTR string, DWORD cchString, SCRIPT_CONTROL *Control, SCRIPT_STATE *State, DWORD item, DWORD nGlyphs, const shapeTest_char *charItems, const shapeTest_glyph *glyphItems, const SCRIPT_GLYPHPROP *props2)
#define test_shape_ok(a, b, c, d, e, f, g, h, i)
static void test_ScriptTextOut(HDC hdc)
static void test_ScriptTextOut3(HDC hdc)
#define test_item_ScriptXtoX(a, b, c, d, e, f)
static void _test_items_ok(LPCWSTR string, DWORD cchString, SCRIPT_CONTROL *Control, SCRIPT_STATE *State, DWORD nItems, const itemTest *items, BOOL nItemsToDo, const INT nItemsBroken[2])
static const struct logical_width_test logical_width_tests[]
#define test_caret_item_ScriptXtoCP(a, b, c, d, e, f)
static void test_ScriptStringXtoCP_CPtoX(HDC hdc)
_In_ LPWSTR _In_ DWORD _In_ DWORD _In_ DWORD dwFlags
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
HWND WINAPI CreateWindowExA(_In_ DWORD dwExStyle, _In_opt_ LPCSTR lpClassName, _In_opt_ LPCSTR lpWindowName, _In_ DWORD dwStyle, _In_ int X, _In_ int Y, _In_ int nWidth, _In_ int nHeight, _In_opt_ HWND hWndParent, _In_opt_ HMENU hMenu, _In_opt_ HINSTANCE hInstance, _In_opt_ LPVOID lpParam)
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
BOOL WINAPI UpdateWindow(_In_ HWND)
HDC WINAPI GetDC(_In_opt_ HWND)
BOOL WINAPI DestroyWindow(_In_ HWND)
BOOL WINAPI SetRect(_Out_ LPRECT, _In_ int, _In_ int, _In_ int, _In_ int)
CHAR lfFaceName[LF_FACESIZE]
SCRIPT_GLYPHPROP GlyphProp
ENUMLOGFONTA elf[MAX_ENUM_FONTS]
BYTE elfFullName[LF_FULLFACESIZE]
#define USP_E_SCRIPT_NOT_IN_FONT
struct tag_SCRIPT_FONTPROPERTIES SCRIPT_FONTPROPERTIES
static const WCHAR props[]
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out
_In_ PWDFDEVICE_INIT _In_ PWDF_REMOVE_LOCK_OPTIONS Options
_In_ WDF_WMI_PROVIDER_CONTROL Control
DWORD WINAPI GetLastError(void)
_In_ FONTOBJ _In_ ULONG _In_ ULONG cGlyphs
BOOL WINAPI GetTextMetricsW(_In_ HDC, _Out_ LPTEXTMETRICW)
DWORD WINAPI GetGlyphIndicesW(_In_ HDC hdc, _In_reads_(c) LPCWSTR lpstr, _In_ int c, _Out_writes_(c) LPWORD pgi, _In_ DWORD fl)
BOOL WINAPI GetCharWidthI(_In_ HDC hdc, _In_ UINT giFirst, _In_ UINT cgi, _In_reads_opt_(cgi) LPWORD pgi, _Out_writes_(cgi) LPINT piWidths)
HFONT WINAPI CreateFontIndirectA(_In_ const LOGFONTA *)
int WINAPI GetObjectA(_In_ HANDLE h, _In_ int c, _Out_writes_bytes_opt_(c) LPVOID pv)
#define TRUETYPE_FONTTYPE
HGDIOBJ WINAPI GetCurrentObject(_In_ HDC, _In_ UINT)
int WINAPI EnumFontFamiliesExA(_In_ HDC, _In_ PLOGFONTA, _In_ FONTENUMPROCA, _In_ LPARAM, _In_ DWORD)
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
int WINAPI EnumFontFamiliesA(_In_ HDC, _In_opt_ LPCSTR, _In_ FONTENUMPROCA, _In_ LPARAM)
#define CHINESEBIG5_CHARSET
BOOL WINAPI ExtTextOutW(_In_ HDC hdc, _In_ int x, _In_ int y, _In_ UINT options, _In_opt_ const RECT *lprect, _In_reads_opt_(c) LPCWSTR lpString, _In_ UINT c, _In_reads_opt_(c) const INT *lpDx)
BOOL WINAPI GetCharABCWidthsI(_In_ HDC hdc, _In_ UINT giFirst, _In_ UINT cgi, _In_reads_opt_(cgi) LPWORD pgi, _Out_writes_(cgi) LPABC pabc)
BOOL WINAPI GetTextExtentExPointW(_In_ HDC hdc, _In_reads_(cchString) LPCWSTR lpszString, _In_ int cchString, _In_ int nMaxExtent, _Out_opt_ LPINT lpnFit, _Out_writes_to_opt_(cchString, *lpnFit) LPINT lpnDx, _Out_ LPSIZE lpSize)
DWORD WINAPI GetGlyphIndicesA(_In_ HDC hdc, _In_reads_(c) LPCSTR lpstr, _In_ int c, _Out_writes_(c) LPWORD pgi, _In_ DWORD fl)
BOOL WINAPI GetTextMetricsA(_In_ HDC, _Out_ LPTEXTMETRICA)
BOOL WINAPI DeleteDC(_In_ HDC)
#define GGI_MARK_NONEXISTING_GLYPHS
BOOL WINAPI GetCharABCWidthsW(_In_ HDC hdc, _In_ UINT wFirst, _In_ UINT wLast, _Out_writes_(wLast - wFirst+1) LPABC lpABC)
#define LGRPID_SIMPLIFIED_CHINESE
#define LGRPID_TRADITIONAL_CHINESE
#define LGRPID_WESTERN_EUROPE
#define LGRPID_CENTRAL_EUROPE
#define LGRPID_VIETNAMESE