64static HRESULT (
WINAPI *pScriptShapeOpenType)(
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);
73 const INT nItemsBroken[2])
78 ULONG tags[15] = {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1};
80 if (pScriptItemizeOpenType)
81 hr = pScriptItemizeOpenType(
string, cchString, 15,
Control,
State, outpItems,
tags, &outnItems);
86 if (nItemsBroken && (
broken(nItemsBroken[0] == outnItems) ||
broken(nItemsBroken[1] == outnItems)))
94 for (
x = 0;
x <= outnItems;
x++)
97 winetest_win_skip(
"This test broken on this platform: item %d CharPos %d\n",
x, outpItems[
x].iCharPos);
99 winetest_ok(outpItems[
x].iCharPos ==
items[
x].iCharPos,
"%i:Wrong CharPos (%i)\n",
x,outpItems[
x].iCharPos);
102 winetest_win_skip(
"This test broken on this platform: item %d fRTL %d\n",
x, outpItems[
x].
a.fRTL);
107 winetest_win_skip(
"This test broken on this platform: item %d fLayoutRTL %d\n",
x, outpItems[
x].
a.fLayoutRTL);
112 winetest_win_skip(
"This test broken on this platform: item %d BidiLevel %d\n",
x, outpItems[
x].
a.s.uBidiLevel);
116 if (
items[
x].isBroken &&
broken(outpItems[
x].
a.s.fOverrideDirection ==
items[
x].broken_value[4]))
117 winetest_win_skip(
"This test broken on this platform: item %d fOverrideDirection %d\n",
x, outpItems[
x].
a.s.fOverrideDirection);
123 if (pScriptItemizeOpenType)
134#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)
136#define MS_MAKE_TAG( _x1, _x2, _x3, _x4 ) \
137 ( ( (ULONG)_x4 << 24 ) | \
138 ( (ULONG)_x3 << 16 ) | \
139 ( (ULONG)_x2 << 8 ) | \
142#define latn_tag MS_MAKE_TAG('l','a','t','n')
143#define arab_tag MS_MAKE_TAG('a','r','a','b')
144#define thai_tag MS_MAKE_TAG('t','h','a','i')
145#define hebr_tag MS_MAKE_TAG('h','e','b','r')
146#define syrc_tag MS_MAKE_TAG('s','y','r','c')
147#define thaa_tag MS_MAKE_TAG('t','h','a','a')
148#define deva_tag MS_MAKE_TAG('d','e','v','a')
149#define beng_tag MS_MAKE_TAG('b','e','n','g')
150#define guru_tag MS_MAKE_TAG('g','u','r','u')
151#define gujr_tag MS_MAKE_TAG('g','u','j','r')
152#define orya_tag MS_MAKE_TAG('o','r','y','a')
153#define taml_tag MS_MAKE_TAG('t','a','m','l')
154#define telu_tag MS_MAKE_TAG('t','e','l','u')
155#define knda_tag MS_MAKE_TAG('k','n','d','a')
156#define mlym_tag MS_MAKE_TAG('m','l','y','m')
157#define mymr_tag MS_MAKE_TAG('m','y','m','r')
158#define tale_tag MS_MAKE_TAG('t','a','l','e')
159#define talu_tag MS_MAKE_TAG('t','a','l','u')
160#define khmr_tag MS_MAKE_TAG('k','h','m','r')
161#define hani_tag MS_MAKE_TAG('h','a','n','i')
162#define bopo_tag MS_MAKE_TAG('b','o','p','o')
163#define kana_tag MS_MAKE_TAG('k','a','n','a')
164#define hang_tag MS_MAKE_TAG('h','a','n','g')
165#define yi_tag MS_MAKE_TAG('y','i',' ',' ')
166#define ethi_tag MS_MAKE_TAG('e','t','h','i')
167#define mong_tag MS_MAKE_TAG('m','o','n','g')
168#define tfng_tag MS_MAKE_TAG('t','f','n','g')
169#define nko_tag MS_MAKE_TAG('n','k','o',' ')
170#define vai_tag MS_MAKE_TAG('v','a','i',' ')
171#define cher_tag MS_MAKE_TAG('c','h','e','r')
172#define cans_tag MS_MAKE_TAG('c','a','n','s')
173#define ogam_tag MS_MAKE_TAG('o','g','a','m')
174#define runr_tag MS_MAKE_TAG('r','u','n','r')
175#define brai_tag MS_MAKE_TAG('b','r','a','i')
176#define dsrt_tag MS_MAKE_TAG('d','s','r','t')
177#define osma_tag MS_MAKE_TAG('o','s','m','a')
178#define math_tag MS_MAKE_TAG('m','a','t','h')
182 static const WCHAR test1[] = {
't',
'e',
's',
't',0};
183 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}};
184 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}};
186 static const WCHAR test1b[] = {
' ',
' ',
' ',
' ',0};
187 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}};
188 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}};
190 static const WCHAR test1c[] = {
' ',
' ',
' ',
'1',
'2',
' ',0};
191 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}};
192 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}};
195 static const WCHAR test2[] = {
'1',
'2',
'3',
'-',
'5',
'2',0x064a,0x064f,0x0633,0x0627,0x0648,0x0650,0x064a,
'7',
'1',
'.',0};
196 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}};
197 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}};
198 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}};
199 static const itemTest t24[5] = {{{0,0,0,0,0,0},0,0,0,0,1,0,
FALSE},
200 {{0,0,0,0,0,0},6,0,0,0,1,
arab_tag,
FALSE},
201 {{0,0,0,0,0,0},13,0,1,0,1,0,
FALSE},
202 {{0,0,0,0,0,0},15,0,0,0,1,0,
FALSE},
203 {{0,0,0,0,0,0},16,0,0,0,0,-1,
FALSE}};
205 static const WCHAR test2b[] = {
'A',
'B',
'C',
'-',
'D',
'E',
'F',
' ',0x0621,0x0623,0x0624,0};
206 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}};
207 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}};
208 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}};
209 static const itemTest t2b4[5] = {{{0,0,0,0,0,0},0,0,0,0,1,
latn_tag,
FALSE},
210 {{0,0,0,0,0,0},3,0,0,0,1,0,
FALSE},
211 {{0,0,0,0,0,0},4,0,0,0,1,
latn_tag,
FALSE},
212 {{0,0,0,0,0,0},8,0,0,0,1,
arab_tag,
FALSE},
213 {{0,0,0,0,0,0},11,0,0,0,0,-1,
FALSE}};
214 static const int b2[2] = {4,4};
217 static const WCHAR test2c[] = {
' ',0x0621,0x0623,0x0624,
'A',
'B',
'C',
'-',
'D',
'E',
'F',0};
218 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}};
219 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}};
220 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}};
221 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}};
222 static const itemTest t2c5[5] = {{{0,0,0,0,0,0},0,0,0,0,1,
arab_tag,
FALSE},
223 {{0,0,0,0,0,0},4,0,0,0,1,
latn_tag,
FALSE},
224 {{0,0,0,0,0,0},7,0,0,0,1,0,
FALSE},
225 {{0,0,0,0,0,0},8,0,0,0,1,
latn_tag,
FALSE},
226 {{0,0,0,0,0,0},11,0,0,0,0,-1,
FALSE}};
229 static const WCHAR test2d[] = {
'A',
'B',
'C',
'-',
'D',
'E',
'F',0x0621,0x0623,0x0624,
' ',0};
230 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}};
231 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}};
232 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}};
233 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}};
234 static const itemTest t2d5[5] = {{{0,0,0,0,0,0},0,0,0,0,1,
latn_tag,
FALSE},
235 {{0,0,0,0,0,0},3,0,0,0,1,0,
FALSE},
236 {{0,0,0,0,0,0},4,0,0,0,1,
latn_tag,
FALSE},
237 {{0,0,0,0,0,0},7,0,0,0,1,
arab_tag,
FALSE},
238 {{0,0,0,0,0,0},11,0,0,0,0,-1,
FALSE}};
242{0x0e04,0x0e27,0x0e32,0x0e21,0x0e1e,0x0e22,0x0e32,0x0e22,0x0e32, 0x0e21
243,0x0e2d,0x0e22,0x0e39,0x0e48,0x0e17,0x0e35,0x0e48,0x0e44,0x0e2b,0x0e19
244,0x0e04,0x0e27,0x0e32,0x0e21,0x0e2a, 0x0e33,0x0e40,0x0e23,0x0e47,0x0e08,
245 0x0e2d,0x0e22,0x0e39,0x0e48,0x0e17,0x0e35,0x0e48,0x0e19,0x0e31,0x0e48,0x0e19,0};
247 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}};
248 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}};
250 static const WCHAR test4[] = {
'1',
'2',
'3',
'-',
'5',
'2',
' ',
'i',
's',
' ',
'7',
'1',
'.',0};
252 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}};
253 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}};
254 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}};
255 static const int b43[2] = {4,4};
258 static const WCHAR test5[] = {0x0627,0x0644,0x0635,0x0651,0x0650,0x062d,0x0629,0x064f,
' ',0x062a,0x064e,
259 0x0627,0x062c,0x064c,
' ',0x0639,0x064e,0x0644,0x0649,
' ',
260 0x0631,0x064f,0x0624,0x0648,0x0633,0x0650,
' ',0x0627,0x0644,
261 0x0623,0x0635,0x0650,0x062d,0x0651,0x064e,0x0627,0x0621,0x0650,0};
262 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}};
263 static const itemTest t52[2] = {{{0,0,0,0,0,0},0,0,0,0,1,
arab_tag,
FALSE},
264 {{0,0,0,0,0,0},38,0,0,0,0,-1,
FALSE}};
268 static const WCHAR test6[] = {0x05e9, 0x05dc, 0x05d5, 0x05dd,
'.',0};
269 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}};
270 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}};
271 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}};
272 static const itemTest t64[3] = {{{0,0,0,0,0,0},0,0,0,0,1,
hebr_tag,
FALSE},
273 {{0,0,0,0,0,0},4,0,0,0,1,0,
FALSE},
274 {{0,0,0,0,0,0},5,0,0,0,0,-1,
FALSE}};
276 static const int b63[2] = {2,2};
277 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};
278 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}};
279 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}};
280 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}};
281 static const itemTest t74[4] = {{{0,0,0,0,0,0},0,0,0,0,1,
latn_tag,
FALSE},
282 {{0,0,0,0,0,0},9,0,0,0,1,
hebr_tag,
FALSE},
283 {{0,0,0,0,0,0},19,0,0,0,1,
latn_tag,
FALSE},
284 {{0,0,0,0,0,0},29,0,0,0,0,-1,
FALSE}};
286 static const WCHAR test8[] = {0x0633, 0x0644, 0x0627, 0x0645,0};
287 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}};
288 static const itemTest t82[2] = {{{0,0,0,0,0,0},0,0,0,0,1,
arab_tag,
FALSE},
289 {{0,0,0,0,0,0},4,0,0,0,0,-1,
FALSE}};
292 static const WCHAR test9[] = {0x0710, 0x0712, 0x0712, 0x0714,
'.',0};
293 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}};
294 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}};
295 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}};
296 static const itemTest t94[3] = {{{0,0,0,0,0,0},0,0,0,0,1,
syrc_tag,
FALSE},
297 {{0,0,0,0,0,0},4,0,0,0,1,0,
FALSE},
298 {{0,0,0,0,0,0},5,0,0,0,0,-1,
FALSE}};
299 static const int b93[2] = {2,2};
301 static const WCHAR test10[] = {0x0717, 0x0718, 0x071a, 0x071b,0};
302 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}};
303 static const itemTest t102[2] = {{{0,0,0,0,0,0},0,0,0,0,1,
syrc_tag,
FALSE},
304 {{0,0,0,0,0,0},4,0,0,0,0,-1,
FALSE}};
307 static const WCHAR test11[] = {0x0926, 0x0947, 0x0935, 0x0928, 0x093e, 0x0917, 0x0930, 0x0940};
308 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}};
309 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}};
312 static const WCHAR test12[] = {0x09ac, 0x09be, 0x0982, 0x09b2, 0x09be};
313 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}};
314 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}};
317 static const WCHAR test13[] = {0x0a17, 0x0a41, 0x0a30, 0x0a2e, 0x0a41, 0x0a16, 0x0a40};
318 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}};
319 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}};
322 static const WCHAR test14[] = {0x0a97, 0x0ac1, 0x0a9c, 0x0ab0, 0x0abe, 0x0aa4, 0x0ac0};
323 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}};
324 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}};
327 static const WCHAR test15[] = {0x0b13, 0x0b21, 0x0b3c, 0x0b3f, 0x0b06};
328 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}};
329 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}};
332 static const WCHAR test16[] = {0x0ba4, 0x0bae, 0x0bbf, 0x0bb4, 0x0bcd};
333 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}};
334 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}};
337 static const WCHAR test17[] = {0x0c24, 0x0c46, 0x0c32, 0x0c41, 0x0c17, 0x0c41};
338 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}};
339 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}};
342 static const WCHAR test18[] = {0x0c95, 0x0ca8, 0x0ccd, 0x0ca8, 0x0ca1};
343 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}};
344 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}};
347 static const WCHAR test19[] = {0x0d2e, 0x0d32, 0x0d2f, 0x0d3e, 0x0d33, 0x0d02};
348 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}};
349 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}};
352 static const WCHAR test20[] = {0x0309,
'a',
'b',
'c',
'd',0};
353 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}};
354 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}};
356 static const WCHAR test21[] = {0x0710, 0x0712, 0x0308, 0x0712, 0x0714,0};
357 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}};
358 static const itemTest t212[2] = {{{0,0,0,0,0,0},0,0,0,0,1,
syrc_tag,
FALSE},
359 {{0,0,0,0,0,0},5,0,0,0,0,-1,
FALSE}};
362 static const WCHAR test22[] = {
'#',
'$',
',',
'!',
'\"',
'*',0};
363 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}};
364 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}};
365 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}};
366 static const int b222[2] = {1,1};
367 static const int b223[2] = {2,2};
370 static const WCHAR test23[] = {
'1',
'2',
'3',0x00b2,0x00b3,0x2070,0};
371 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}};
372 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}};
375 static const WCHAR test24[] = {0x1019,0x103c,0x1014,0x103a,0x1019,0x102c,0x1021,0x1000,0x1039,0x1001,0x101b,0x102c};
376 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}};
377 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}};
380 static const WCHAR test25[] = {0x1956,0x196d,0x1970,0x1956,0x196c,0x1973,0x1951,0x1968,0x1952,0x1970};
381 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}};
382 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}};
385 static const WCHAR test26[] = {0x1992,0x19c4};
386 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}};
387 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}};
390 static const WCHAR test27[] = {0x1781,0x17c1,0x1798,0x179a,0x1797,0x17b6,0x179f,0x17b6};
391 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}};
392 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}};
395 static const WCHAR test28[] = {0x8bed,0x7d20,0x6587,0x5b57};
396 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}};
397 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}};
400 static const WCHAR test29[] = {0x2ff0,0x2ff3,0x2ffb,0x2ff0,0x65e5,0x65e5,0x5de5,0x7f51,0x4e02,0x4e5e};
401 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}};
402 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}};
405 static const WCHAR test30[] = {0x3113,0x3128,0x3127,0x3123,0x3108,0x3128,0x310f,0x3120};
406 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}};
407 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}};
410 static const WCHAR test31[] = {0x3072,0x3089,0x304b,0x306a,0x30ab,0x30bf,0x30ab,0x30ca};
411 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}};
412 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}};
413 static const int b311[2] = {2,2};
414 static const int b312[2] = {2,2};
417 static const WCHAR test32[] = {0xd55c,0xad6d,0xc5b4};
418 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}};
419 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}};
422 static const WCHAR test33[] = {0xa188,0xa320,0xa071,0xa0b7};
423 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}};
424 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}};
427 static const WCHAR test34[] = {0x130d,0x12d5,0x12dd};
428 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}};
429 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}};
430 static const int b342[2] = {2,2};
433 static const WCHAR test35[] = {0x182e,0x1823,0x1829,0x182d,0x1823,0x182f,0x0020,0x182a,0x1822,0x1834,0x1822,0x182d,0x180c};
434 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}};
435 static const int b351[2] = {2,2};
436 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}};
437 static const int b352[2] = {2,3};
438 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}};
441 static const WCHAR test36[] = {0x2d5c,0x2d49,0x2d3c,0x2d49,0x2d4f,0x2d30,0x2d56};
442 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}};
443 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}};
446 static const WCHAR test37[] = {0x07d2,0x07de,0x07cf};
447 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}};
448 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}};
449 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}};
452 static const WCHAR test38[] = {0xa559,0xa524};
453 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}};
454 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}};
457 static const WCHAR test39[] = {0x13e3,0x13b3,0x13a9,0x0020,0x13a6,0x13ec,0x13c2,0x13af,0x13cd,0x13d7};
458 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}};
459 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}};
462 static const WCHAR test40[] = {0x1403,0x14c4,0x1483,0x144e,0x1450,0x1466};
463 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}};
464 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}};
467 static const WCHAR test41[] = {0x169b,0x1691,0x168c,0x1690,0x168b,0x169c};
468 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}};
469 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}};
470 static const int b412[2] = {1,1};
473 static const WCHAR test42[] = {0x16a0,0x16a1,0x16a2,0x16a3,0x16a4,0x16a5};
474 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}};
475 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}};
478 static const WCHAR test43[] = {0x280f,0x2817,0x2811,0x280d,0x280a,0x2811,0x2817};
479 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}};
480 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}};
483 static const WCHAR test44[] = {0xe000, 0xe001, 0xd800, 0xd801};
484 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}};
485 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}};
488 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};
489 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}};
490 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}};
493 static const WCHAR test46[] = {0xd801,0xdc8b,0xd801,0xdc98,0xd801,0xdc88,0xd801,0xdc91,0xd801,0xdc9b,0xd801,0xdc92,0xd801,0xdc95,0xd801,0xdc80};
494 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}};
495 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}};
498 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};
499 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}};
500 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}};
504 static const WCHAR test48[] = {0x05e9,
' ',
'1',
'2',
'3',
'.'};
505 static const itemTest t481[4] = {{{0,0,0,0,0,0},0,1,1,1,0,
hebr_tag,
FALSE},
506 {{0,0,0,0,0},2,0,1,2,0,0,
FALSE},{{0,0,0,0,0},5,0,0,0,0,0,
FALSE},
507 {{0,0,0,0,0},6,0,0,0,0,-1,
FALSE}};
508 static const itemTest t482[4] = {{{0,0,0,0,0,0},0,0,0,0,1,
hebr_tag,
FALSE},
509 {{0,0,0,0,0,0},2,0,1,0,1,0,
FALSE},
510 {{0,0,0,0,0,0},5,0,0,0,1,0,
FALSE},
511 {{0,0,0,0,0,0},6,0,0,0,0,-1,
FALSE}};
513 static const WCHAR test49[] = {0x05e9,
' ',
'1',
'2',
'.',
'1',
'2'};
514 static const itemTest t491[3] = {{{0,0,0,0,0,0},0,1,1,1,0,
hebr_tag,
FALSE},
515 {{0,0,0,0,0},2,0,1,2,0,0,
FALSE},{{0,0,0,0,0},7,0,0,0,0,-1,
FALSE}};
516 static const itemTest t492[3] = {{{0,0,0,0,0,0},0,0,0,0,1,
hebr_tag,
FALSE},
517 {{0,0,0,0,0,0},2,0,1,0,1,0,
FALSE},
518 {{0,0,0,0,0,0},7,0,0,0,0,-1,
FALSE}};
520 static const WCHAR test50[] = {0x05e9,
' ',
'.',
'1',
'2',
'3'};
521 static const itemTest t501[4] = {{{0,0,0,0,0,0},0,1,1,1,0,
hebr_tag,
FALSE},
522 {{0,0,0,0,0},2,1,1,1,0,0,
FALSE},{{0,0,0,0,0},3,0,1,2,0,0,
FALSE},
523 {{0,0,0,0,0},6,0,0,0,0,-1,
FALSE}};
524 static const itemTest t502[4] = {{{0,0,0,0,0,0},0,0,0,0,1,
hebr_tag,
FALSE},
525 {{0,0,0,0,0,0},2,0,0,0,1,0,
FALSE},
526 {{0,0,0,0,0,0},3,0,1,0,1,0,
FALSE},
527 {{0,0,0,0,0,0},6,0,0,0,0,-1,
FALSE}};
529 static const WCHAR test51[] = {0x05e9,
' ',
'a',
'b',
'.',
'1',
'2'};
530 static const itemTest t511[5] = {{{0,0,0,0,0,0},0,1,1,1,0,
hebr_tag,
FALSE},
531 {{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},
532 {{0,0,0,0,0},5,0,0,2,0,0,
FALSE},{{0,0,0,0,0},7,0,0,0,0,-1,
FALSE}};
533 static const itemTest t512[5] = {{{0,0,0,0,0,0},0,0,0,0,1,
hebr_tag,
FALSE},
534 {{0,0,0,0,0,0},2,0,0,0,1,
latn_tag,
FALSE},
535 {{0,0,0,0,0,0},4,0,0,0,1,0,
FALSE},
536 {{0,0,0,0,0,0},5,0,0,0,1,0,
FALSE},
537 {{0,0,0,0,0,0},7,0,0,0,0,-1,
FALSE}};
539 static const WCHAR test52[] = {0x05e9,
' ',
'1',
'2',
'.',
'a',
'b'};
540 static const itemTest t521[5] = {{{0,0,0,0,0,0},0,1,1,1,0,
hebr_tag,
FALSE},
541 {{0,0,0,0,0},2,0,1,2,0,0,
FALSE},{{0,0,0,0,0},4,0,0,0,0,0,
FALSE},
542 {{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}};
543 static const itemTest t522[5] = {{{0,0,0,0,0,0},0,0,0,0,1,
hebr_tag,
FALSE},
544 {{0,0,0,0,0,0},2,0,1,0,1,0,
FALSE},
545 {{0,0,0,0,0,0},4,0,0,0,1,0,
FALSE},
546 {{0,0,0,0,0,0},5,0,0,0,1,
latn_tag,
FALSE},
547 {{0,0,0,0,0,0},7,0,0,0,0,-1,
FALSE}};
549 static const WCHAR test53[] = {0x05e9,
' ',
'1',
'2',
'.',
'.',
'1',
'2'};
550 static const itemTest t531[5] = {{{0,0,0,0,0,0},0,1,1,1,0,
hebr_tag,
FALSE},
551 {{0,0,0,0,0},2,0,1,2,0,0,
FALSE},{{0,0,0,0,0},4,1,1,1,0,0,
FALSE},
552 {{0,0,0,0,0},6,0,1,2,0,0,
FALSE},{{0,0,0,0,0},8,0,0,0,0,-1,
FALSE}};
553 static const itemTest t532[5] = {{{0,0,0,0,0,0},0,0,0,0,1,
hebr_tag,
FALSE},
554 {{0,0,0,0,0,0},2,0,1,0,1,0,
FALSE},
555 {{0,0,0,0,0,0},4,0,0,0,1,0,
FALSE},
556 {{0,0,0,0,0,0},6,0,1,0,1,0,
FALSE},
557 {{0,0,0,0,0,0},8,0,0,0,0,-1,
FALSE}};
559 static const WCHAR test54[] = {0x05e9,
' ',
'1',
'2',
'+',
'1',
'2'};
560 static const itemTest t541[3] = {{{0,0,0,0,0,0},0,1,1,1,0,
hebr_tag,
FALSE},
561 {{0,0,0,0,0},2,0,1,2,0,0,
FALSE},{{0,0,0,0,0},7,0,0,0,0,-1,
FALSE}};
562 static const itemTest t542[3] = {{{0,0,0,0,0,0},0,0,0,0,1,
hebr_tag,
FALSE},
563 {{0,0,0,0,0,0},2,0,1,0,1,0,
FALSE},
564 {{0,0,0,0,0,0},7,0,0,0,0,-1,
FALSE}};
565 static const WCHAR test55[] = {0x05e9,
' ',
'1',
'2',
'+',
'+',
'1',
'2'};
566 static const itemTest t551[3] = {{{0,0,0,0,0,0},0,1,1,1,0,
hebr_tag,
FALSE},
567 {{0,0,0,0,0},2,0,1,2,0,0,
FALSE},{{0,0,0,0,0},8,0,0,0,0,-1,
FALSE}};
568 static const itemTest t552[3] = {{{0,0,0,0,0,0},0,0,0,0,1,
hebr_tag,
FALSE},
569 {{0,0,0,0,0,0},2,0,1,0,1,0,
FALSE},
570 {{0,0,0,0,0,0},8,0,0,0,0,-1,
FALSE}};
573 static const WCHAR test56[] = {0x0645, 0x06cc, 0x200c, 0x06a9, 0x0646, 0x0645};
574 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}};
575 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}};
578 static const WCHAR test57[] = {0x06f1, 0x06f2, 0x066c, 0x06f3, 0x06f4, 0x06f5, 0x066c,
579 0x06f6, 0x06f7, 0x06f8, 0x066b, 0x06f9, 0x06f0};
580 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},
581 {{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},
582 {{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},
583 {{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}};
584 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},
585 {{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},
586 {{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},
587 {{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}};
588 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},
589 {{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},
590 {{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},
591 {{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}};
593 static const WCHAR test58[] = {0x0661, 0x0662, 0x066c, 0x0663, 0x0664, 0x0665, 0x066c,
594 0x0666, 0x0667, 0x0668, 0x066b, 0x0669, 0x0660};
595 static const itemTest t581[] = {{{0,0,0,0,0,0}, 0,0,1,2,0,
arab_tag,
FALSE},
596 {{0,0,0,0,0,0},13,0,0,0,0,-1,
FALSE}};
597 static const itemTest t582[] = {{{0,0,1,1,1,0}, 0,0,0,0,1,
arab_tag,
FALSE},
598 {{0,0,0,0,0,0},13,0,0,0,0,-1,
FALSE}};
610 ok (
hr ==
E_INVALIDARG,
"ScriptItemize should return E_INVALIDARG if pwcInChars is NULL\n");
613 ok (
hr ==
E_INVALIDARG,
"ScriptItemize should return E_INVALIDARG if pItems is NULL\n");
616 ok (
hr ==
E_INVALIDARG,
"ScriptItemize should return E_INVALIDARG if cMaxItems < 2.\n");
619 ok (
hr ==
E_INVALIDARG,
"ScriptItemize should return E_INVALIDARG if cInChars is 0\n");
677 State.uBidiLevel = 0;
742 State.uBidiLevel = 1;
799 State.uBidiLevel = 1;
857 State.uBidiLevel = 0;
859 State.fOverrideDirection = 1;
937 out[0] = ((
i >> 10) &
mask) + 0xd800;
951 surrogate[0] = 0xd800;
974 int x, outnItems = 0, outnGlyphs = 0, outnGlyphs2 = 0;
979 WORD *logclust, *logclust2;
980 int maxGlyphs = cchString * 1.5;
990 hr = pScriptItemizeOpenType(
string, cchString, 15,
Control,
State, outpItems,
tags, &outnItems);
996 if (outnItems <=
item)
1006 memset(logclust,
'a',
sizeof(
WORD) * cchString);
1016 memset(logclust2,
'a', cchString *
sizeof(*logclust2));
1018 memset(charProp2,
'a', cchString *
sizeof(*charProp2));
1020 memset(glyphs2,
'a', maxGlyphs *
sizeof(*glyphs2));
1022 memset(glyphProp2,
'a', maxGlyphs *
sizeof(*glyphProp2));
1024 winetest_ok(!outpItems[
item].
a.fLogicalOrder,
"Got unexpected fLogicalOrder %#x.\n",
1026 hr = pScriptShapeOpenType(
hdc, &sc, &outpItems[
item].
a,
tags[
item], 0x00000000,
NULL,
NULL, 0,
string, cchString, maxGlyphs, logclust, charProp,
glyphs, glyphProp, &outnGlyphs);
1034 for (
x = 0;
x < cchString;
x++)
1037 winetest_ok(logclust[
x] == charItems[
x].wLogClust,
"%i: invalid LogClust(%i)\n",
x,logclust[
x]);
1038 else if (logclust[
x] != charItems[
x].wLogClust)
1041 winetest_ok(charProp[
x].fCanGlyphAlone == charItems[
x].CharProp.fCanGlyphAlone,
"%i: invalid fCanGlyphAlone\n",
x);
1042 else if (charProp[
x].fCanGlyphAlone != charItems[
x].CharProp.fCanGlyphAlone)
1047 winetest_ok(nGlyphs == outnGlyphs,
"got incorrect number of glyphs (%i)\n",outnGlyphs);
1048 else if (nGlyphs != outnGlyphs)
1049 winetest_trace(
"got incorrect number of glyphs (%i)\n",outnGlyphs);
1050 for (
x = 0;
x < outnGlyphs;
x++)
1052 if (glyphItems[
x].Glyph)
1075 winetest_trace(
"%i: uJustification incorrect (%i)\n",
x,glyphProp[
x].sva.uJustification);
1082 winetest_trace(
"%i: fClusterStart incorrect (%i)\n",
x,glyphProp[
x].sva.fClusterStart);
1088 winetest_trace(
"%i: fDiacritic incorrect (%i)\n",
x,glyphProp[
x].sva.fDiacritic);
1094 winetest_trace(
"%i: fZeroWidth incorrect (%i)\n",
x,glyphProp[
x].sva.fZeroWidth);
1099 string, cchString, maxGlyphs, logclust2, charProp2, glyphs2, glyphProp2, &outnGlyphs2);
1104 for (
x = 0;
x < cchString; ++
x)
1106 unsigned int compare_idx = outpItems[
item].
a.
fRTL ? cchString -
x - 1 :
x;
1108 "Got unexpected logclust2[%u] %#x, expected %#x.\n",
1109 x, logclust2[
x], logclust[compare_idx]);
1110 winetest_ok(charProp2[
x].fCanGlyphAlone == charProp[compare_idx].fCanGlyphAlone,
1111 "Got unexpected charProp2[%u].fCanGlyphAlone %#x, expected %#x.\n",
1112 x, charProp2[
x].fCanGlyphAlone, charProp[compare_idx].fCanGlyphAlone);
1115 winetest_ok(outnGlyphs2 == outnGlyphs,
"Got unexpected glyph count %u.\n", outnGlyphs2);
1116 for (
x = 0;
x < outnGlyphs2; ++
x)
1118 unsigned int compare_idx = outpItems[
item].
a.
fRTL ? outnGlyphs2 -
x - 1 :
x;
1119 winetest_ok(glyphs2[
x] ==
glyphs[compare_idx],
"Got unexpected glyphs2[%u] %#x, expected %#x.\n",
1120 x, glyphs2[
x],
glyphs[compare_idx]);
1122 "Got unexpected glyphProp2[%u].sva.uJustification %#x, expected %#x.\n",
1125 "Got unexpected glyphProp2[%u].sva.fClusterStart %#x, expected %#x.\n",
1128 "Got unexpected glyphProp2[%u].sva.fDiacritic %#x, expected %#x.\n",
1131 "Got unexpected glyphProp2[%u].sva.fZeroWidth %#x, expected %#x.\n",
1145 for (
x = 0;
x < cchString; ++
x)
1152 string2, cchString, maxGlyphs, logclust2, charProp2, glyphs2, glyphProp2, &outnGlyphs2);
1154 for (
x = 0;
x < cchString; ++
x)
1156 unsigned int compare_idx = cchString -
x - 1;
1158 "Got unexpected logclust2[%u] %#x, expected %#x.\n",
1159 x, logclust2[
x], logclust[compare_idx]);
1160 winetest_ok(charProp2[
x].fCanGlyphAlone == charProp[compare_idx].fCanGlyphAlone,
1161 "Got unexpected charProp2[%u].fCanGlyphAlone %#x, expected %#x.\n",
1162 x, charProp2[
x].fCanGlyphAlone, charProp[compare_idx].fCanGlyphAlone);
1164 winetest_ok(outnGlyphs2 == outnGlyphs,
"Got unexpected glyph count %u.\n", outnGlyphs2);
1165 for (
x = 0;
x < outnGlyphs2; ++
x)
1170 "Got unexpected glyphProp2[%u].sva.uJustification %#x, expected %#x.\n",
1173 "Got unexpected glyphProp2[%u].sva.fClusterStart %#x, expected %#x.\n",
1176 "Got unexpected glyphProp2[%u].sva.fDiacritic %#x, expected %#x.\n",
1179 "Got unexpected glyphProp2[%u].sva.fZeroWidth %#x, expected %#x.\n",
1184 string2, cchString, maxGlyphs, logclust2, charProp2, glyphs2, glyphProp2, &outnGlyphs2);
1186 for (
x = 0;
x < cchString; ++
x)
1188 unsigned int compare_idx = outpItems[
item].
a.
fRTL ?
x : cchString -
x - 1;
1189 winetest_ok(logclust2[
x] == logclust[compare_idx],
"Got unexpected logclust2[%u] %#x, expected %#x.\n",
1190 x, logclust2[
x], logclust[compare_idx]);
1191 winetest_ok(charProp2[
x].fCanGlyphAlone == charProp[compare_idx].fCanGlyphAlone,
1192 "Got unexpected charProp2[%u].fCanGlyphAlone %#x, expected %#x.\n",
1193 x, charProp2[
x].fCanGlyphAlone, charProp[compare_idx].fCanGlyphAlone);
1195 winetest_ok(outnGlyphs2 == outnGlyphs,
"Got unexpected glyph count %u.\n", outnGlyphs2);
1196 for (
x = 0;
x < outnGlyphs2; ++
x)
1198 unsigned int compare_idx = outpItems[
item].
a.
fRTL ? outnGlyphs2 -
x - 1 :
x;
1199 winetest_ok(glyphs2[
x] ==
glyphs[compare_idx],
"Got unexpected glyphs2[%u] %#x, expected %#x.\n",
1200 x, glyphs2[
x],
glyphs[compare_idx]);
1202 "Got unexpected glyphProp2[%u].sva.uJustification %#x, expected %#x.\n",
1205 "Got unexpected glyphProp2[%u].sva.fClusterStart %#x, expected %#x.\n",
1208 "Got unexpected glyphProp2[%u].sva.fDiacritic %#x, expected %#x.\n",
1211 "Got unexpected glyphProp2[%u].sva.fZeroWidth %#x, expected %#x.\n",
1230#define test_shape_ok(a,b,c,d,e,f,g,h,i) \
1231 (winetest_set_location(__FILE__,__LINE__), 0) ? 0 : _test_shape_ok(1,a,b,c,d,e,f,g,h,i,NULL)
1233#define test_shape_ok_valid(v,a,b,c,d,e,f,g,h,i) \
1234 (winetest_set_location(__FILE__,__LINE__), 0) ? 0 : _test_shape_ok(v,a,b,c,d,e,f,g,h,i,NULL)
1236#define test_shape_ok_valid_props2(v,a,b,c,d,e,f,g,h,i,j) \
1237 (winetest_set_location(__FILE__,__LINE__), 0) ? 0 : _test_shape_ok(v,a,b,c,d,e,f,g,h,i,j)
1256 while (
i >=
sizeof(
DWORD)*8)
1300 for (
i=0;
i < 10;
i++)
1301 if (output[
i] != fingerprint->
result[
i])
1309 if (
i == 10) rc = 1;
1355#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)
1372 static const WCHAR test1[] = {
'w',
'i',
'n',
'e',0};
1373 static const shapeTest_char t1_c[] = {{0,{0,0}},{1,{0,0}},{2,{0,0}},{3,{0,0}}};
1380 static const WCHAR test2[] = {0x202B,
'i',
'n', 0x202C,0};
1381 static const shapeTest_char t2_c[] = {{0,{0,0}},{1,{0,0}},{2,{0,0}},{3,{0,0}}};
1388 static const WCHAR test3[] = {
't',
't',
'f',
'f',
'f',
'i', 0};
1389 static const shapeTest_char t3_c[] = {{0, {0, 0}}, {0, {0, 0}}, {0, {0, 0}},
1390 {1, {0, 0}}, {1, {0, 0}}, {1, {0, 0}}};
1396 static const WCHAR test_hebrew[] = {0x05e9, 0x05dc, 0x05d5, 0x05dd,0};
1397 static const shapeTest_char hebrew_c[] = {{3,{0,0}},{2,{0,0}},{1,{0,0}},{0,{0,0}}};
1405 static const WCHAR test_arabic[] = {0x0633,0x0644,0x0627,0x0645,0};
1406 static const shapeTest_char arabic_c[] = {{2,{0,0}},{1,{0,0}},{1,{0,0}},{0,{0,0}}};
1413 static const WCHAR test_thai[] = {0x0e2a, 0x0e04, 0x0e23, 0x0e34, 0x0e1b, 0x0e15, 0x0e4c, 0x0e44, 0x0e17, 0x0e22,};
1414 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}}};
1428 static const WCHAR test_syriac[] = {0x0710, 0x072c, 0x0728, 0x0742, 0x0718, 0x0723, 0x0720, 0x0710, 0};
1429 static const shapeTest_char syriac_c[] = {{6, {0, 0}}, {5, {0, 0}}, {4, {0, 0}},
1430 {4, {0, 0}}, {2, {0, 0}}, {1, {0, 0}}, {0, {0, 0}}, {0, {0, 0}}};
1441 static const WCHAR test_thaana[] = {0x078a, 0x07ae, 0x0792, 0x07b0, 0x0020, 0x0796, 0x07aa, 0x0789, 0x07b0, 0x0795, 0x07ac, 0x0791, 0x07b0};
1442 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}}};
1459 static const WCHAR test_phagspa[] = {0xa84f, 0xa861, 0xa843, 0x0020, 0xa863, 0xa861, 0xa859, 0x0020, 0xa850, 0xa85c, 0xa85e};
1460 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}}};
1487 static const WCHAR test_lao[] = {0x0ead, 0x0eb1, 0x0e81, 0x0eaa, 0x0ead, 0x0e99, 0x0ea5, 0x0eb2, 0x0ea7, 0};
1488 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}}};
1501 static const WCHAR test_tibetan[] = {0x0f04, 0x0f05, 0x0f0e, 0x0020, 0x0f51, 0x0f7c, 0x0f53, 0x0f0b, 0x0f5a, 0x0f53, 0x0f0b, 0x0f51, 0x0f44, 0x0f0b, 0x0f54, 0x0f7c, 0x0f0d};
1502 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}}};
1541 static const WCHAR test_devanagari[] = {0x0926, 0x0947, 0x0935, 0x0928, 0x093e, 0x0917, 0x0930, 0x0940};
1542 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}}};
1554 static const WCHAR test_bengali[] = {0x09ac, 0x09be, 0x0982, 0x09b2, 0x09be};
1555 static const shapeTest_char bengali_c[] = {{0,{0,0}},{0,{0,0}},{0,{0,0}},{3,{0,0}},{3,{0,0}}};
1564 static const WCHAR test_gurmukhi[] = {0x0a17, 0x0a41, 0x0a30, 0x0a2e, 0x0a41, 0x0a16, 0x0a40};
1565 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}}};
1576 static const WCHAR test_gujarati[] = {0x0a97, 0x0ac1, 0x0a9c, 0x0ab0, 0x0abe, 0x0aa4, 0x0ac0};
1577 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}}};
1588 static const WCHAR test_oriya[] = {0x0b13, 0x0b21, 0x0b3c, 0x0b3f, 0x0b06};
1589 static const shapeTest_char oriya_c[] = {{0,{0,0}},{1,{0,0}},{1,{0,0}},{1,{0,0}},{3,{0,0}}};
1597 static const WCHAR test_tamil[] = {0x0ba4, 0x0bae, 0x0bbf, 0x0bb4, 0x0bcd};
1598 static const shapeTest_char tamil_c[] = {{0,{0,0}},{1,{0,0}},{1,{0,0}},{3,{0,0}},{3,{0,0}}};
1606 static const WCHAR test_telugu[] = {0x0c24, 0x0c46, 0x0c32, 0x0c41, 0x0c17, 0x0c41};
1607 static const shapeTest_char telugu_c[] = {{0,{0,0}},{0,{0,0}},{2,{0,0}},{2,{0,0}},{4,{0,0}},{4,{0,0}}};
1617 static const WCHAR test_malayalam[] = {0x0d2e, 0x0d32, 0x0d2f, 0x0d3e, 0x0d33, 0x0d02};
1618 static const shapeTest_char malayalam_c[] = {{0,{0,0}},{1,{0,0}},{2,{0,0}},{2,{0,0}},{4,{0,0}},{4,{0,0}}};
1628 static const WCHAR test_kannada[] = {0x0c95, 0x0ca8, 0x0ccd, 0x0ca8, 0x0ca1};
1629 static const shapeTest_char kannada_c[] = {{0,{0,0}},{1,{0,0}},{1,{0,0}},{1,{0,0}},{3,{0,0}}};
1638 {
'A',
'a',
'B',
'b',
'C',
'c',
'D',
'd',0,0},
1639 {284,310,285,311,286,312,287,313,0,0}};
1642 if (!pScriptItemizeOpenType || !pScriptShapeOpenType)
1644 win_skip(
"ScriptShapeOpenType not available on this platform\n");
1652 ok(
hr ==
S_OK,
"ScriptItemizeOpenType should return S_OK not %08x\n",
hr);
1653 ok(
items[0].
a.fNoGlyphIndex ==
FALSE,
"fNoGlyphIndex TRUE\n");
1655 hr = pScriptShapeOpenType(
hdc, &sc, &
items[0].
a,
tags[0], 0x00000000,
NULL,
NULL, 0,
test1, 4, 4,
NULL,
NULL,
glyphs,
NULL, &nb);
1656 ok(
hr ==
E_INVALIDARG,
"ScriptShapeOpenType should return E_INVALIDARG not %08x\n",
hr);
1658 hr = pScriptShapeOpenType(
hdc, &sc, &
items[0].
a,
tags[0], 0x00000000,
NULL,
NULL, 0,
test1, 4, 4,
NULL,
NULL,
glyphs, glyphProp,
NULL);
1659 ok(
hr ==
E_INVALIDARG,
"ScriptShapeOpenType should return E_INVALIDARG not %08x\n",
hr);
1661 hr = pScriptShapeOpenType(
NULL, &sc, &
items[0].
a,
tags[0], 0x00000000,
NULL,
NULL, 0,
test1, 4, 4,
NULL,
NULL,
glyphs, glyphProp, &nb);
1662 ok(
hr ==
E_INVALIDARG,
"ScriptShapeOpenType should return E_PENDING not %08x\n",
hr);
1664 hr = pScriptShapeOpenType(
hdc, &sc, &
items[0].
a,
tags[0], 0x00000000,
NULL,
NULL, 0,
test1, 4, 4,
NULL,
NULL,
glyphs, glyphProp, &nb);
1666 "ScriptShapeOpenType should return E_FAIL or E_INVALIDARG, not %08x\n",
hr);
1667 hr = pScriptShapeOpenType(
hdc, &sc, &
items[0].
a,
tags[0], 0x00000000,
NULL,
NULL, 0,
test1, 4, 4, logclust,
NULL,
glyphs, glyphProp, &nb);
1668 ok(
hr ==
E_INVALIDARG,
"ScriptShapeOpenType should return E_INVALIDARG not %08x\n",
hr);
1675 memcpy(glyph_test, t2_g,
sizeof(glyph_test));
1678 glyph_test[0].
Glyph = 1;
1680 glyph_test[3].
Glyph = 1;
1738 phagspa_c, phagspa_g, phagspa_win10_props);
1755 tibetan_c, tibetan_g, tibetan_win10_props);
1835 static const WCHAR test1[] = {
'w',
'i',
'n',
'e',0};
1836 static const WCHAR test2[] = {0x202B,
'i',
'n', 0x202C,0};
1841 WORD glyphs[4], glyphs2[4], logclust[4], glyphs3[4];
1847 ok(
hr ==
S_OK,
"ScriptItemize should return S_OK not %08x\n",
hr);
1848 ok(
items[0].
a.fNoGlyphIndex ==
FALSE,
"fNoGlyphIndex TRUE\n");
1857 ok(
hr ==
E_PENDING,
"ScriptShape should return E_PENDING not %08x\n",
hr);
1863 "ScriptShape should return E_FAIL or E_INVALIDARG, not %08x\n",
hr);
1864 ok(
items[0].
a.fNoGlyphIndex ==
FALSE,
"fNoGlyphIndex TRUE\n");
1867 ok(
hr ==
S_OK,
"ScriptShape should return S_OK not %08x\n",
hr);
1868 ok(
items[0].
a.fNoGlyphIndex ==
FALSE,
"fNoGlyphIndex TRUE\n");
1871 ok(
hr ==
S_OK,
"ScriptShape should return S_OK not %08x\n",
hr);
1872 ok(sc2 == sc,
"caches %p, %p not identical\n", sc, sc2);
1876 memset(logclust,-1,
sizeof(logclust));
1877 memset(attrs,-1,
sizeof(attrs));
1879 ok(
hr ==
S_OK,
"ScriptShape should return S_OK not %08x\n",
hr);
1880 ok(nb == 4,
"Wrong number of items\n");
1881 ok(logclust[0] == 0,
"clusters out of order\n");
1882 ok(logclust[1] == 1,
"clusters out of order\n");
1883 ok(logclust[2] == 2,
"clusters out of order\n");
1884 ok(logclust[3] == 3,
"clusters out of order\n");
1889 ok(attrs[0].fClusterStart == 1,
"fClusterStart incorrect\n");
1890 ok(attrs[1].fClusterStart == 1,
"fClusterStart incorrect\n");
1891 ok(attrs[2].fClusterStart == 1,
"fClusterStart incorrect\n");
1892 ok(attrs[3].fClusterStart == 1,
"fClusterStart incorrect\n");
1893 ok(attrs[0].fDiacritic == 0,
"fDiacritic incorrect\n");
1894 ok(attrs[1].fDiacritic == 0,
"fDiacritic incorrect\n");
1895 ok(attrs[2].fDiacritic == 0,
"fDiacritic incorrect\n");
1896 ok(attrs[3].fDiacritic == 0,
"fDiacritic incorrect\n");
1897 ok(attrs[0].fZeroWidth == 0,
"fZeroWidth incorrect\n");
1898 ok(attrs[1].fZeroWidth == 0,
"fZeroWidth incorrect\n");
1899 ok(attrs[2].fZeroWidth == 0,
"fZeroWidth incorrect\n");
1900 ok(attrs[3].fZeroWidth == 0,
"fZeroWidth incorrect\n");
1905 memset(glyphs2,-1,
sizeof(glyphs2));
1906 memset(glyphs3,-1,
sizeof(glyphs3));
1907 memset(logclust,-1,
sizeof(logclust));
1908 memset(attrs,-1,
sizeof(attrs));
1913 ok(
hr ==
S_OK,
"ScriptShape should return S_OK not %08x\n",
hr);
1914 ok(nb == 4,
"Wrong number of items\n");
1915 ok(glyphs2[0] == glyphs3[0],
"Incorrect glyph for 0x202B\n");
1916 ok(glyphs2[3] == glyphs3[3],
"Incorrect glyph for 0x202C\n");
1917 ok(logclust[0] == 0,
"clusters out of order\n");
1918 ok(logclust[1] == 1,
"clusters out of order\n");
1919 ok(logclust[2] == 2,
"clusters out of order\n");
1920 ok(logclust[3] == 3,
"clusters out of order\n");
1925 ok(attrs[0].fClusterStart == 1,
"fClusterStart incorrect\n");
1926 ok(attrs[1].fClusterStart == 1,
"fClusterStart incorrect\n");
1927 ok(attrs[2].fClusterStart == 1,
"fClusterStart incorrect\n");
1928 ok(attrs[3].fClusterStart == 1,
"fClusterStart incorrect\n");
1929 ok(attrs[0].fDiacritic == 0,
"fDiacritic incorrect\n");
1930 ok(attrs[1].fDiacritic == 0,
"fDiacritic incorrect\n");
1931 ok(attrs[2].fDiacritic == 0,
"fDiacritic incorrect\n");
1932 ok(attrs[3].fDiacritic == 0,
"fDiacritic incorrect\n");
1933 ok(attrs[0].fZeroWidth == 0,
"fZeroWidth incorrect\n");
1934 ok(attrs[1].fZeroWidth == 0,
"fZeroWidth incorrect\n");
1935 ok(attrs[2].fZeroWidth == 0,
"fZeroWidth incorrect\n");
1936 ok(attrs[3].fZeroWidth == 0,
"fZeroWidth incorrect\n");
1939 items[0].a.fRTL = 1;
1940 memset(glyphs2,-1,
sizeof(glyphs2));
1941 memset(logclust,-1,
sizeof(logclust));
1942 memset(attrs,-1,
sizeof(attrs));
1944 ok(
hr ==
S_OK,
"ScriptShape should return S_OK not %08x\n",
hr);
1945 ok(nb == 4,
"Wrong number of items\n");
1946 ok(glyphs2[0] ==
glyphs[3],
"Glyphs not reordered properly\n");
1947 ok(glyphs2[1] ==
glyphs[2],
"Glyphs not reordered properly\n");
1948 ok(glyphs2[2] ==
glyphs[1],
"Glyphs not reordered properly\n");
1949 ok(glyphs2[3] ==
glyphs[0],
"Glyphs not reordered properly\n");
1950 ok(logclust[0] == 3,
"clusters out of order\n");
1951 ok(logclust[1] == 2,
"clusters out of order\n");
1952 ok(logclust[2] == 1,
"clusters out of order\n");
1953 ok(logclust[3] == 0,
"clusters out of order\n");
1958 ok(attrs[0].fClusterStart == 1,
"fClusterStart incorrect\n");
1959 ok(attrs[1].fClusterStart == 1,
"fClusterStart incorrect\n");
1960 ok(attrs[2].fClusterStart == 1,
"fClusterStart incorrect\n");
1961 ok(attrs[3].fClusterStart == 1,
"fClusterStart incorrect\n");
1962 ok(attrs[0].fDiacritic == 0,
"fDiacritic incorrect\n");
1963 ok(attrs[1].fDiacritic == 0,
"fDiacritic incorrect\n");
1964 ok(attrs[2].fDiacritic == 0,
"fDiacritic incorrect\n");
1965 ok(attrs[3].fDiacritic == 0,
"fDiacritic incorrect\n");
1966 ok(attrs[0].fZeroWidth == 0,
"fZeroWidth incorrect\n");
1967 ok(attrs[1].fZeroWidth == 0,
"fZeroWidth incorrect\n");
1968 ok(attrs[2].fZeroWidth == 0,
"fZeroWidth incorrect\n");
1969 ok(attrs[3].fZeroWidth == 0,
"fZeroWidth incorrect\n");
1974 for (
i = 0;
i < 2;
i++)
1980 unsigned int item_count;
2020 ok(nb == 1,
"%s: expected 1, got %d\n", lf.
lfFaceName, nb);
2032 ok(nb ==
test_data[
j].item_count,
"%s: [%02x] Got unexpected item count %d.\n",
2036 ok(!
item->a.fNoGlyphIndex,
"%s: [%02x] got unexpected fNoGlyphIndex %#x.\n",
2040 ok(nb == 3,
"%s: [%02x] expected 3, got %d\n", lf.
lfFaceName,
c, nb);
2041 ok(!
item->a.fNoGlyphIndex,
"%s: [%02x] got unexpected fNoGlyphIndex %#x.\n",
2045 broken(glyphs2[1] ==
c && (
c < 0x10)),
2046 "%s: [%02x] expected %04x, got %04x\n", lf.
lfFaceName,
c,
glyphs[0], glyphs2[1]);
2047 ok(attrs[1].fZeroWidth ||
broken(!attrs[1].fZeroWidth && (
c < 0x10) ),
2050 item->a.fNoGlyphIndex = 1;
2053 ok(nb == 3,
"%s: [%02x] expected 1, got %d\n", lf.
lfFaceName,
c, nb);
2055 if (
c == 0x200b ||
c == 0x200c ||
c == 0x200d)
2057 ok(glyphs2[1] == 0x0020,
2058 "%s: [%02x] got unexpected %04x.\n", lf.
lfFaceName,
c, glyphs2[1]);
2059 ok(attrs[1].fZeroWidth,
"%s: [%02x] got unexpected fZeroWidth %#x.\n",
2065 "%s: [%02x] got unexpected %04x.\n", lf.
lfFaceName,
c, glyphs2[1]);
2066 ok(!attrs[1].fZeroWidth,
"%s: [%02x] got unexpected fZeroWidth %#x.\n",
2079 ok(
hr ==
S_OK,
"ScriptItemize failed, hr %#x.\n",
hr);
2080 ok(
items[0].
a.eScript > 0,
"Expected script id.\n");
2081 ok(nb == 1,
"Unexpected number of items.\n");
2087 ok(
hr ==
S_OK,
"ScriptShape failed, hr %#x.\n",
hr);
2088 ok(nb == 1,
"Unexpected glyph count %u\n", nb);
2089 ok(
glyphs[0] == 0,
"Unexpected glyph id\n");
2095 static const WCHAR test1[] = {
't',
'e',
's',
't',0};
2096 static const WCHAR test2[] = {0x3044, 0x308d, 0x306f,0};
2112 ok(
hr ==
S_OK,
"ScriptItemize should return S_OK not %08x\n",
hr);
2113 ok(
items[0].
a.fNoGlyphIndex ==
FALSE,
"fNoGlyphIndex TRUE\n");
2116 ok(
hr ==
S_OK,
"ScriptShape should return S_OK not %08x\n",
hr);
2117 ok(
items[0].
a.fNoGlyphIndex ==
FALSE,
"fNoGlyphIndex TRUE\n");
2126 "ScriptPlace should return E_FAIL or E_INVALIDARG, not %08x\n",
hr);
2129 ok(
hr ==
E_PENDING,
"ScriptPlace should return E_PENDING not %08x\n",
hr);
2135 "ScriptPlace should return E_FAIL or E_INVALIDARG, not %08x\n",
hr);
2138 ok(
hr ==
S_OK,
"ScriptPlace should return S_OK not %08x\n",
hr);
2139 ok(
items[0].
a.fNoGlyphIndex ==
FALSE,
"fNoGlyphIndex TRUE\n");
2142 ok(
hr ==
S_OK,
"ScriptPlace should return S_OK not %08x\n",
hr);
2143 ok(sc2 == sc,
"caches %p, %p not identical\n", sc, sc2);
2148 int old_width = widths[0];
2152 ok(
hr ==
S_OK,
"ScriptPlace should return S_OK not %08x\n",
hr);
2153 ok(widths[0] == 0,
"got width %d\n", widths[0]);
2154 widths[0] = old_width;
2157 skip(
"Glyph already has zero-width - skipping fZeroWidth test\n");
2160 ok(
ret,
"ExtTextOutW should return TRUE\n");
2165 memset(&lf, 0,
sizeof(lf));
2171 ok(
ret,
"GetTextMetrics failed\n");
2173 switch(
tm.tmCharSet) {
2182 ok(
ret,
"GetTextExtentExPoint failed\n");
2184 if (sz.
cx >
len *
tm.tmAveCharWidth)
2187 ok(
hr ==
S_OK,
"ScriptItemize should return S_OK not %08x\n",
hr);
2188 ok(
items[0].
a.fNoGlyphIndex ==
FALSE,
"fNoGlyphIndex TRUE\n");
2193 ok(
hr ==
S_OK,
"ScriptShape should return S_OK not %08x\n",
hr);
2196 memset(widths,
'a',
sizeof(widths));
2198 ok(
hr ==
S_OK,
"ScriptPlace should return S_OK not %08x\n",
hr);
2200 for (
total = 0,
i = 0;
i < nb;
i++)
2204 ok(widths[
i] >
tm.tmAveCharWidth,
"[%d] expected greater than %d, got %d\n",
2205 i,
tm.tmAveCharWidth, widths[
i]);
2211 skip(
"Associated font is unavailable\n");
2216 skip(
"Non-CJK locale\n");
2230 WCHAR TestItem1[] = {
'T',
'e',
's',
't',
'a', 0};
2231 WCHAR TestItem2[] = {
'T',
'e',
's',
't',
'b', 0};
2232 WCHAR TestItem3[] = {
'T',
'e',
's',
't',
'c',
' ',
'1',
'2',
'3',
' ',
' ',
'e',
'n',
'd',0};
2233 WCHAR TestItem4[] = {
'T',
'e',
's',
't',
'd',
' ',0x0684,0x0694,0x06a4,
' ',
' ',
'\r',
'\n',
'e',
'n',
'd',0};
2234 WCHAR TestItem5[] = {0x0684,
'T',
'e',
's',
't',
'e',
' ',0x0684,0x0694,0x06a4,
' ',
' ',
'e',
'n',
'd',0};
2235 WCHAR TestItem6[] = {
'T',
'e',
's',
't',
'f',
' ',
' ',
' ',
'\r',
'\n',
'e',
'n',
'd',0};
2238 unsigned short pwOutGlyphs1[256];
2249 ok(
hr ==
S_OK,
"ScriptGetProperties failed: 0x%08x\n",
hr);
2250 trace(
"number of script properties %d\n", iMaxProps);
2251 ok(iMaxProps > 0,
"Got unexpected script count %d.\n", iMaxProps);
2252 ok(ppSp[0]->
langid == 0,
"Got unexpected langid %#x.\n", ppSp[0]->
langid);
2257 ok(
hr ==
S_OK,
"Got unexpected hr %#x.\n",
hr);
2261 ok(pItem[0].iCharPos == 0,
"Got unexpected character position %d.\n", pItem[0].iCharPos);
2262 ok(pItem[1].iCharPos ==
cInChars,
"Got unexpected character position %d, expected %d.\n",
2276 ok(
hr ==
S_OK,
"Got unexpected hr %#x.\n",
hr);
2277 ok(!!
psc,
"Got unexpected psc %p.\n",
psc);
2284 psva, &pItem[0].
a, piAdvance, pGoffset, pABC);
2285 ok(
hr ==
S_OK,
"Got unexpected hr %#x.\n",
hr);
2287 psva, &pItem[0].
a, piAdvance, pGoffset, pABC);
2288 ok(
hr ==
S_OK,
"Got unexpected hr %#x.\n",
hr);
2294 ok(
hr ==
S_OK,
"Got unexpected hr %#x.\n",
hr);
2298 ok(pItem[0].iCharPos == 0,
"Got unexpected character position %d.\n", pItem[0].iCharPos);
2299 ok(pItem[1].iCharPos ==
cInChars,
"Got unexpected character position %d, expected %d.\n",
2305 ok(
hr ==
S_OK,
"Got unexpected hr %#x.\n",
hr);
2306 ok(!!
psc,
"Got unexpected psc %p.\n",
psc);
2311 ok(pwOutGlyphs1[
i] == TestItem2[
i],
2312 "Got unexpected pwOutGlyphs1[%u] %#x, expected %#x.\n",
2313 i, pwOutGlyphs1[
i], TestItem2[
i]);
2317 psva, &pItem[0].
a, piAdvance, pGoffset, pABC);
2318 ok(
hr ==
S_OK,
"Got unexpected hr %#x.\n",
hr);
2320 ok(!
psc,
"Got unexpected psc %p.\n",
psc);
2326 ok(
hr ==
S_OK,
"Got unexpected hr %#x.\n",
hr);
2328 ok(pItem[0].iCharPos == 0,
"Got unexpected character position %d.\n", pItem[0].iCharPos);
2329 ok(pItem[1].iCharPos == 6,
"Got unexpected character position %d.\n", pItem[1].iCharPos);
2330 ok(pItem[2].iCharPos == 11,
"Got unexpected character position %d.\n", pItem[2].iCharPos);
2331 ok(pItem[3].iCharPos ==
cInChars,
"Got unexpected character position %d, expected %d.\n",
2338 ok(
hr ==
S_OK,
"Got unexpected hr %#x.\n",
hr);
2341 ok(pItem[0].iCharPos == 0,
"Got unexpected character position %d.\n", pItem[0].iCharPos);
2342 ok(pItem[1].iCharPos == 6,
"Got unexpected character position %d.\n", pItem[1].iCharPos);
2343 ok(pItem[2].iCharPos == 11,
"Got unexpected character position %d.\n", pItem[2].iCharPos);
2344 ok(pItem[3].iCharPos == 12,
"Got unexpected character position %d.\n", pItem[3].iCharPos);
2345 ok(pItem[4].iCharPos == 13,
"Got unexpected character position %d.\n", pItem[4].iCharPos);
2346 ok(pItem[5].iCharPos ==
cInChars,
"Got unexpected character position %d, expected %d.\n",
2349 ok(pItem[0].
a.s.uBidiLevel == 0,
"Got unexpected bidi level %u.\n", pItem[0].
a.
s.
uBidiLevel);
2350 ok(pItem[1].
a.s.uBidiLevel == 1,
"Got unexpected bidi level %u.\n", pItem[1].
a.
s.
uBidiLevel);
2351 ok(pItem[2].
a.s.uBidiLevel == 0,
"Got unexpected bidi level %u.\n", pItem[2].
a.
s.
uBidiLevel);
2352 ok(pItem[3].
a.s.uBidiLevel == 0,
"Got unexpected bidi level %u.\n", pItem[3].
a.
s.
uBidiLevel);
2353 ok(pItem[4].
a.s.uBidiLevel == 0,
"Got unexpected bidi level %u.\n", pItem[3].
a.
s.
uBidiLevel);
2357 ok(
hr ==
S_OK,
"Got unexpected hr %#x.\n",
hr);
2359 ok(pItem[0].
a.s.uBidiLevel == 1,
"Got unexpected bidi level %u.\n", pItem[0].
a.
s.
uBidiLevel);
2375 unsigned short pwOutGlyphs2[256];
2376 unsigned short pwOutGlyphs3[256];
2380 static const WCHAR TestItem1[] = {
'T',
'e',
's',
't',
'a', 0};
2381 static const WCHAR TestItem2[] = {0x202B,
'i',
'n', 0x202C,0};
2382 static const WCHAR TestItem3[] = {
'a',
'b',
'c',
'd',
'(',
'<',
'{',
'[',0x2039,0};
2383 static const WCHAR TestItem3b[] = {
'a',
'b',
'c',
'd',
')',
'>',
'}',
']',0x203A,0};
2392 "expected E_INVALIDARG, got %08x\n",
hr);
2395 ok(
hr ==
E_INVALIDARG,
"(NULL,NULL,TestItem1, cInChars, dwFlags, pwOutGlyphs3), "
2396 "expected E_INVALIDARG, got %08x\n",
hr);
2401 ok(
hr ==
E_PENDING,
"(NULL,&psc,NULL,0,0,NULL), expected E_PENDING, "
2403 ok(
psc ==
NULL,
"Expected psc to be NULL, got %p\n",
psc);
2408 ok(
hr ==
S_OK,
"ScriptGetCMap(NULL,&psc,NULL,0,0,NULL), expected S_OK, "
2410 ok(
psc !=
NULL,
"ScriptGetCMap expected psc to be not NULL\n");
2416 ok(
hr ==
E_PENDING,
"(NULL,&psc,), expected E_PENDING, got %08x\n",
hr);
2417 ok(
psc ==
NULL,
"Expected psc to be NULL, got %p\n",
psc);
2420 ok (
hr ==
S_OK,
"ScriptGetCMap should return S_OK not (%08x)\n",
hr);
2421 ok (
psc !=
NULL,
"psc should not be null and have SCRIPT_CACHE buffer address\n");
2423 ok (
cnt ==
cInChars,
"Translation not correct. WCHAR %d - %04x != %04x\n",
2427 ok (!
psc,
"psc is not null after ScriptFreeCache\n");
2434 if (pwOutGlyphs3[0] == 0 || pwOutGlyphs3[3] == 0)
2435 ok(
hr ==
S_FALSE,
"ScriptGetCMap should return S_FALSE not (%08x)\n",
hr);
2437 ok(
hr ==
S_OK,
"ScriptGetCMap should return S_OK not (%08x)\n",
hr);
2439 ok(
psc !=
NULL,
"psc should not be null and have SCRIPT_CACHE buffer address\n");
2440 ok(pwOutGlyphs3[0] == pwOutGlyphs2[0],
"expected glyph %d, got %d\n", pwOutGlyphs2[0], pwOutGlyphs3[0]);
2441 ok(pwOutGlyphs3[3] == pwOutGlyphs2[3],
"expected glyph %d, got %d\n", pwOutGlyphs2[3], pwOutGlyphs3[3]);
2445 ok (
hr ==
S_OK,
"ScriptGetCMap should return S_OK not (%08x)\n",
hr);
2446 ok (
psc !=
NULL,
"psc should not be null and have SCRIPT_CACHE buffer address\n");
2451 ok (
hr ==
S_OK,
"ScriptGetCMap should return S_OK not (%08x)\n",
hr);
2452 ok (
psc !=
NULL,
"psc should not be null and have SCRIPT_CACHE buffer address\n");
2453 ok(pwOutGlyphs3[0] == pwOutGlyphs2[0],
"glyph incorrectly altered\n");
2454 ok(pwOutGlyphs3[1] == pwOutGlyphs2[1],
"glyph incorrectly altered\n");
2455 ok(pwOutGlyphs3[2] == pwOutGlyphs2[2],
"glyph incorrectly altered\n");
2456 ok(pwOutGlyphs3[3] == pwOutGlyphs2[3],
"glyph incorrectly altered\n");
2457 ok(pwOutGlyphs3[4] == pwOutGlyphs2[4],
"glyph not mirrored correctly\n");
2458 ok(pwOutGlyphs3[5] == pwOutGlyphs2[5],
"glyph not mirrored correctly\n");
2459 ok(pwOutGlyphs3[6] == pwOutGlyphs2[6],
"glyph not mirrored correctly\n");
2460 ok(pwOutGlyphs3[7] == pwOutGlyphs2[7],
"glyph not mirrored correctly\n");
2461 ok(pwOutGlyphs3[8] == pwOutGlyphs2[8],
"glyph not mirrored correctly\n");
2464 ok (!
psc,
"psc is not null after ScriptFreeCache\n");
2467#define MAX_ENUM_FONTS 4096
2520 static const WCHAR invalids[] = {0x0020, 0x200B, 0xF71B};
2538 ok(
psc ==
NULL,
"Expected psc to be NULL, got %p\n",
psc);
2543 ok(
hr ==
E_PENDING,
"(NULL,&psc,&sfp), expected E_PENDING, got %08x\n",
hr);
2544 ok(
psc ==
NULL,
"Expected psc to be NULL, got %p\n",
psc);
2556 ok(
psc ==
NULL,
"Expected psc to be NULL, got %p\n",
psc);
2562 ok(
hr ==
E_INVALIDARG,
"(hdc,&psc,&sfp) invalid, expected E_INVALIDARG, got %08x\n",
hr);
2563 ok(
psc !=
NULL,
"Expected a pointer in psc, got NULL\n");
2566 ok(
psc ==
NULL,
"Expected psc to be NULL, got %p\n",
psc);
2572 ok(
hr ==
S_OK,
"(hdc,&psc,&sfp) partly initialized, expected S_OK, got %08x\n",
hr);
2573 ok(
psc !=
NULL,
"Expected a pointer in psc, got NULL\n");
2579 ok(
hr ==
S_OK,
"(NULL,&psc,&sfp), expected S_OK, got %08x\n",
hr);
2580 ok(
psc == old_psc,
"Expected psc not to be changed, was %p is now %p\n", old_psc,
psc);
2582 ok(
psc ==
NULL,
"Expected psc to be NULL, got %p\n",
psc);
2603 ok(
hr ==
S_OK,
"ScriptGetFontProperties expected S_OK, got %08x\n",
hr);
2615 ok(
ret != 0,
"GetTextMetricsA failed!\n");
2620 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]);
2651 ok(
hr ==
S_OK,
"ScriptGetFontProperties expected S_OK, got %08x\n",
hr);
2671 if (gi[2] != 0xFFFF)
2673 else if (gi[1] != 0xFFFF)
2675 else if (gi[0] != 0xFFFF)
2701 WCHAR TestItem1[] = {
'T',
'e',
's',
't',
'a', 0};
2704 unsigned short pwOutGlyphs1[256];
2718 ok(
hr ==
S_OK,
"Got unexpected hr %#x.\n",
hr);
2722 ok(pItem[0].iCharPos == 0,
"Got unexpected character position %d.\n", pItem[0].iCharPos);
2723 ok(pItem[1].iCharPos ==
cInChars,
"Got unexpected character position %d, expected %d.\n",
2730 ok(
hr ==
S_OK,
"Got unexpected hr %#x.\n",
hr);
2731 ok(!!
psc,
"Got unexpected psc %p.\n",
psc);
2736 psva, &pItem[0].
a, piAdvance, pGoffset, pABC);
2737 ok(
hr ==
S_OK,
"Got unexpected hr %#x.\n",
hr);
2740 ok(!
psc,
"Got unexpected psc %p.\n",
psc);
2742 hr =
ScriptTextOut(
NULL,
NULL, 0, 0, 0,
NULL,
NULL,
NULL, 0,
NULL, 0,
NULL,
NULL,
NULL);
2749 hr =
ScriptTextOut(
NULL, &
psc, 0, 0, 0,
NULL,
NULL,
NULL, 0,
NULL, 0,
NULL,
NULL,
NULL);
2751 ok(!
psc,
"Got unexpected psc %p.\n",
psc);
2757 ok(!
psc,
"Got unexpected psc %p.\n",
psc);
2760 ok(
hr ==
S_OK,
"Got unexpected hr %#x.\n",
hr);
2766 ok(
hr ==
S_OK,
"Got unexpected hr %#x.\n",
hr);
2769 ok(
hr ==
S_OK,
"Got unexpected hr %#x.\n",
hr);
2772 ok(
hr ==
S_OK,
"Got unexpected hr %#x.\n",
hr);
2775 ok(!
psc,
"Got unexpected psc %p.\n",
psc);
2788 WCHAR TestItem1[] = {
'T',
'e',
's',
't',
'a', 0};
2791 unsigned short pwOutGlyphs1[256];
2802 ok(!!
hdc1,
"Failed to create a DC.\n");
2804 ok(!!
hdc2,
"Failed to create a DC.\n");
2809 ok(
hr ==
S_OK,
"Got unexpected hr %#x.\n",
hr);
2813 ok(pItem[0].iCharPos == 0,
"Got unexpected character position %d.\n", pItem[0].iCharPos);
2814 ok(pItem[1].iCharPos ==
cInChars,
"Got unexpected character position %d, expected %d.\n",
2820 ok(
hr ==
S_OK,
"Got unexpected hr %#x.\n",
hr);
2821 ok(!!
psc,
"Got unexpected psc %p.\n",
psc);
2826 psva, &pItem[0].
a, piAdvance, pGoffset, pABC);
2827 ok(
hr ==
S_OK,
"Got unexpected hr %#x.\n",
hr);
2831 ok(
ret,
"Got unexpected ret %#x.\n",
ret);
2838 ok(
hr ==
S_OK,
"Got unexpected hr %#x.\n",
hr);
2839 ok(!!
psc,
"Got unexpected psc %p.\n",
psc);
2844 ok(!
psc,
"Got unexpected psc %p.\n",
psc);
2854 WCHAR TestItem1[] = {
' ',
'\r', 0};
2857 unsigned short pwOutGlyphs1[256];
2870 ok(
hr ==
S_OK,
"Got unexpected hr %#x.\n",
hr);
2874 ok(pItem[0].iCharPos == 0,
"Got unexpected character position %d.\n", pItem[0].iCharPos);
2875 ok(pItem[1].iCharPos == 1,
"Got unexpected character position %d.\n", pItem[0].iCharPos);
2876 ok(pItem[2].iCharPos ==
cInChars,
"Got unexpected character position %d, expected %d.\n",
2882 ok(
hr ==
S_OK,
"Got unexpected hr %#x.\n",
hr);
2883 ok(!!
psc,
"Got unexpected psc %p.\n",
psc);
2888 psva, &pItem[0].
a, piAdvance, pGoffset, pABC);
2889 ok(
hr ==
S_OK,
"Got unexpected hr %#x.\n",
hr);
2895 ok(
hr ==
S_OK,
"Got unexpected hr %#x.\n",
hr);
2898 ok(!
psc,
"Got unexpected psc %p.\n",
psc);
2901#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)
2906 int icChars, icGlyphs;
2914 memset(psva,0,
sizeof(psva));
2915 direction = (
psa->fRTL)?-1:+1;
2917 for(iCP = 0; iCP <
cChars; iCP++)
2924 winetest_ok(piCP == iCP,
"ScriptXtoCP: iX=%d should return piCP=%d not %d\n", iX, iCP, piCP);
2925 winetest_ok(piTrailing == 0,
"ScriptXtoCP: iX=%d should return piTrailing=0 not %d\n", iX, piTrailing);
2928 for(iCP = 0; iCP <
cChars; iCP++)
2935 winetest_ok(piCP == iCP,
"ScriptXtoCP leading: iX=%d should return piCP=%d not %d\n", iX, iCP, piCP);
2936 winetest_ok(piTrailing == 0,
"ScriptXtoCP leading: iX=%d should return piTrailing=0 not %d\n", iX, piTrailing);
2939 for(iCP = 0; iCP <
cChars; iCP++)
2941 iX =
offsets[iCP+1]-direction;
2946 winetest_ok(piCP == iCP,
"ScriptXtoCP trailing: iX=%d should return piCP=%d not %d\n", iX, iCP, piCP);
2947 winetest_ok(piTrailing == 1,
"ScriptXtoCP trailing: iX=%d should return piTrailing=1 not %d\n", iX, piTrailing);
2950 for(iCP = 0; iCP <=
cChars+1; iCP++)
2958 "ScriptCPtoX: iCP=%d should return piX=%d not %d\n", iCP,
offsets[iCP], piX);
2961 for(iCP = 0; iCP <=
cChars+1; iCP++)
2969 "ScriptCPtoX trailing: iCP=%d should return piX=%d not %d\n", iCP,
offsets[iCP+1], piX);
2973#define test_caret_item_ScriptXtoCP(a,b,c,d,e,f) _test_caret_item_ScriptXtoCP(__LINE__,a,b,c,d,e,f)
2978 int icChars, icGlyphs;
2986 memset(psva,0,
sizeof(psva));
2987 direction = (
psa->fRTL)?-1:+1;
2989 for(iX = -1,
i = iCP = 0;
i <
cChars;
i++)
2999 ok_(__FILE__,
line)(
hr ==
S_OK,
"ScriptXtoCP: should return S_OK not %08x\n",
hr);
3000 ok_(__FILE__,
line)(piCP == iCP,
"ScriptXtoCP: iX=%d should return piCP=%d not %d\n", iX, iCP, piCP);
3001 ok_(__FILE__,
line)(piTrailing == 0,
"ScriptXtoCP: iX=%d should return piTrailing=0 not %d\n", iX, piTrailing);
3014 ok_(__FILE__,
line)(
hr ==
S_OK,
"ScriptXtoCP leading: should return S_OK not %08x\n",
hr);
3015 ok_(__FILE__,
line)(piCP == iCP,
"ScriptXtoCP leading: iX=%d should return piCP=%d not %d\n", iX, iCP, piCP);
3016 ok_(__FILE__,
line)(piTrailing == 0,
"ScriptXtoCP leading: iX=%d should return piTrailing=0 not %d\n", iX, piTrailing);
3019 for(clusterSize = 0, iCP = 0, iX = -2,
i = 0;
i <
cChars;
i++)
3028 ok_(__FILE__,
line)(
hr ==
S_OK,
"ScriptXtoCP trailing: should return S_OK not %08x\n",
hr);
3029 ok_(__FILE__,
line)(piCP == iCP,
"ScriptXtoCP trailing: iX=%d should return piCP=%d not %d\n", iX, iCP, piCP);
3030 ok_(__FILE__,
line)(piTrailing == clusterSize,
"ScriptXtoCP trailing: iX=%d should return piTrailing=%d not %d\n", iX, clusterSize, piTrailing);
3043 WORD pwLogClust_RTL[10] = {3, 3, 3, 2, 2, 1, 1, 0, 0, 0};
3044 WORD pwLogClust_2[7] = {4, 3, 3, 2, 1, 0 ,0};
3045 WORD pwLogClust_3[17] = {0, 1, 1, 1, 1, 4, 5, 6, 6, 8, 8, 8, 8, 11, 11, 13, 13};
3046 WORD pwLogClust_3_RTL[17] = {13, 13, 11, 11, 8, 8, 8, 8, 6, 6, 5, 4, 1, 1, 1, 1, 0};
3047 int piAdvance[10] = {201, 190, 210, 180, 170, 204, 189, 195, 212, 203};
3048 int piAdvance_2[5] = {39, 26, 19, 17, 11};
3049 int piAdvance_3[15] = {6, 6, 0, 0, 10, 5, 10, 0, 12, 0, 0, 9, 0, 10, 0};
3050 static const int offsets[13] = {0, 67, 134, 201, 296, 391, 496, 601, 1052, 1503, 1954, 1954, 1954};
3051 static const int offsets_RTL[13] = {781, 721, 661, 601, 496, 391, 296, 201, 134, 67, 0, 0, 0};
3052 static const int offsets_2[10] = {112, 101, 92, 84, 65, 39, 19, 0, 0, 0};
3054 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};
3055 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};
3064 static const WCHAR hebrW[] = { 0x5be, 0};
3065 static const WCHAR thaiW[] = { 0xe2a, 0};
3069 memset(psva, 0,
sizeof(psva));
3073 ok(
hr ==
S_OK,
"ScriptXtoCP should return S_OK not %08x\n",
hr);
3075 ok(piCP == -1,
"Negative iX should return piCP=-1 not %d\n", piCP);
3077 ok(piCP == 10,
"Negative iX should return piCP=10 not %d\n", piCP);
3079 for (iX = 0; iX <= 7; iX++)
3084 ok(
hr ==
S_OK,
"ScriptXtoCP failed, hr %#x.\n",
hr);
3085 ok(piCP==0 && piTrailing==0,
"%i should return 0(%i) and 0(%i)\n",iX, piCP,piTrailing);
3087 for (iX = 8; iX < 16; iX++)
3092 ok(
hr ==
S_OK,
"ScriptXtoCP failed, hr %#x.\n",
hr);
3093 ok(piCP==0 && piTrailing==1,
"%i should return 0(%i) and 1(%i)\n",iX, piCP,piTrailing);
3097 hr =
ScriptXtoCP(-1, 10, 10, pwLogClust_RTL, psva, piAdvance, &
sa, &piCP, &piTrailing);
3098 ok(
hr ==
S_OK,
"ScriptXtoCP should return S_OK not %08x\n",
hr);
3100 ok(piCP == -1,
"Negative iX should return piCP=-1 not %d\n", piCP);
3102 ok(piCP == 10,
"Negative iX should return piCP=10 not %d\n", piCP);
3105 hr =
ScriptXtoCP(1954, 10, 10, pwLogClust_RTL, psva, piAdvance, &
sa, &piCP, &piTrailing);
3106 ok(
hr ==
S_OK,
"ScriptXtoCP should return S_OK not %08x\n",
hr);
3107 ok(piCP == -1,
"iX=%d should return piCP=-1 not %d\n", iX, piCP);
3108 ok(piTrailing == 1,
"iX=%d should return piTrailing=1 not %d\n", iX, piTrailing);
3110 for (iX = 1; iX <= 8; iX++)
3115 ok(
hr ==
S_OK,
"ScriptXtoCP() failed, hr %#x.\n",
hr);
3116 ok(piCP==0 && piTrailing==1,
"%i should return 0(%i) and 1(%i)\n",iX,piCP,piTrailing);
3118 for (iX = 9; iX < 16; iX++)
3123 ok(
hr ==
S_OK,
"ScriptXtoCP() failed, hr %#x.\n",
hr);
3124 ok(piCP==0 && piTrailing==0,
"%i should return 0(%i) and 0(%i)\n",iX,piCP,piTrailing);
3136 ok(
i == 1,
"got %d\n",
i);
3144 ok(
i == 1,
"got %d\n",
i);
3153 hr =
ScriptXtoCP(0, 17, 15, pwLogClust_3_RTL, psva, piAdvance_3, &
sa, &piCP, &piTrailing);
3154 ok(
hr ==
S_OK,
"ScriptXtoCP: should return S_OK not %08x\n",
hr);
3155 ok(piCP == 16,
"ScriptXtoCP: iX=0 should return piCP=16 not %d\n", piCP);
3156 ok(piTrailing == 1,
"ScriptXtoCP: iX=0 should return piTrailing=1 not %d\n", piTrailing);
3159 win_skip(
"Uniscribe version too old to test Hebrew clusters\n");
3172 WCHAR teststr[] = {
'T',
'e',
's',
't',
'1',
' ',
'a',
'2',
'b',
'3',
'\0'};
3174 int Glyphs =
len * 2 + 16;
3177 static const int Dx[
ARRAY_SIZE(teststr) - 1];
3184 const RECT rc = {0, 50, 100, 100};
3188 const int *clip_len;
3205 ok(
hr ==
S_OK,
"Got unexpected hr %#x.\n",
hr);
3211 ok(
hr ==
S_OK,
"Got unexpected hr %#x.\n",
hr);
3212 ok(!!ssa,
"Got unexpected ssa %p.\n", ssa);
3215 ok(
hr ==
S_OK,
"Got unexpected hr %#x.\n",
hr);
3218 ok(*clip_len ==
len,
"Got unexpected *clip_len %d, expected %d.\n", *clip_len,
len);
3222 ok(
hr ==
S_OK,
"Got unexpected hr %#x.\n",
hr);
3224 for (
i = 0;
i < *clip_len; ++
i)
3231 ok(
hr ==
S_OK,
"Got unexpected hr %#x.\n",
hr);
3240 static const WCHAR teststr1[] = {0x05e9,
'i', 0x05dc,
'n', 0x05d5,
'e', 0x05dd,
'.',0};
3241 static const BOOL rtl[] = {1, 0, 1, 0, 1, 0, 1, 0};
3242 unsigned int String_len =
ARRAY_SIZE(teststr1) - 1;
3243 int Glyphs = String_len * 2 + 16;
3259 "Got unexpected hr %08x.\n",
hr);
3262 ok(!!ssa,
"Got unexpected ssa %p.\n", ssa);
3266 for (Cp = 0; Cp < String_len; ++Cp)
3275 ok(
hr ==
S_OK,
"Got unexpected hr %#x.\n",
hr);
3277 ok(
hr ==
S_OK,
"Got unexpected hr %#x.\n",
hr);
3278 ok(
rtl[Cp] ? lead > trail : lead < trail,
3279 "Got unexpected lead %d, trail %d, for rtl[%u] %u.\n",
3280 lead, trail, Cp,
rtl[Cp]);
3287 X =
rtl[Cp] ? lead - 1 : lead + 1;
3289 ok(
hr ==
S_OK,
"Got unexpected hr %#x.\n",
hr);
3290 ok(
Ch == Cp,
"Got unexpected Ch %d for X %d, expected %d.\n",
Ch,
X, Cp);
3291 ok(!iTrailing,
"Got unexpected iTrailing %#x for X %d.\n", iTrailing,
X);
3294 X =
rtl[Cp] ? trail + 1 : trail - 1;
3296 ok(
hr ==
S_OK,
"Got unexpected hr %#x.\n",
hr);
3297 ok(
Ch == Cp,
"Got unexpected Ch %d for X %d, expected %d.\n",
Ch,
X, Cp);
3298 ok(iTrailing,
"Got unexpected iTrailing %#x for X %d.\n", iTrailing,
X);
3301 if (Cp < String_len - 1)
3303 X =
rtl[Cp] ? lead + 1 : trail + 1;
3305 ok(
hr ==
S_OK,
"Got unexpected hr %#x.\n",
hr);
3306 ok(
Ch == Cp + 1,
"Got unexpected Ch %d for X %d, expected %d.\n",
Ch,
X, Cp + 1);
3307 ok(iTrailing == !!
rtl[Cp + 1],
"Got unexpected iTrailing %#x for X %d, expected %#x.\n",
3308 iTrailing,
X, !!
rtl[Cp + 1]);
3314 X =
rtl[Cp] ? trail - 1 : lead - 1;
3316 ok(
hr ==
S_OK,
"Got unexpected hr %#x.\n",
hr);
3317 ok(
Ch == Cp - 1,
"Got unexpected Ch %d for X %d, expected %d.\n",
Ch,
X, Cp - 1);
3318 ok(iTrailing == !
rtl[Cp - 1],
"Got unexpected iTrailing %#x for X %d, expected %#x.\n",
3319 iTrailing,
X, !
rtl[Cp - 1]);
3329 ok(
hr ==
S_OK,
"Got unexpected hr %#x.\n",
hr);
3332 ok(
hr ==
S_OK,
"Got unexpected hr %#x.\n",
hr);
3333 ok(
Ch == 1,
"Got unexpected Ch %d.\n",
Ch);
3334 ok(!iTrailing,
"Got unexpected iTrailing %#x.\n", iTrailing);
3339 ok(
hr ==
S_OK,
"Got unexpected hr %#x.\n",
hr);
3342 ok(
hr ==
S_OK,
"Got unexpected hr %#x.\n",
hr);
3343 ok(
Ch == -1,
"Got unexpected Ch %d.\n",
Ch);
3344 ok(iTrailing,
"Got unexpected iTrailing %#x.\n", iTrailing);
3348 if (
rtl[String_len - 1])
3351 ok(
hr ==
S_OK,
"Got unexpected hr %#x.\n",
hr);
3356 ok(
hr ==
S_OK,
"Got unexpected hr %#x.\n",
hr);
3360 ok(
hr ==
S_OK,
"Got unexpected hr %#x.\n",
hr);
3361 ok(
Ch == String_len,
"Got unexpected Ch %d, expected %d.\n",
Ch, String_len);
3362 ok(!iTrailing,
"Got unexpected iTrailing %#x.\n", iTrailing);
3366 ok(
hr ==
S_OK,
"Got unexpected hr %#x.\n",
hr);
3372 ok(
hr ==
S_OK,
"Got unexpected hr %#x.\n",
hr);
3385 HWND hwnd =
CreateWindowExA(0,
"Static",
"",
WS_POPUP, 0, 0, 100, 100, 0, 0, 0,
NULL);
3386 ok(
hwnd !=
NULL,
"Failed to create test window.\n");
3417 ok(
height == 123,
"Unexpected height.\n");
3421 ok(
tm.tmHeight > 0,
"Unexpected tmHeight %u.\n",
tm.tmHeight);
3425 ok(
hr ==
S_OK,
"expected S_OK, got 0x%08x\n",
hr);
3426 ok(
height ==
tm.tmHeight,
"expected height > 0\n");
3431 ok(
hr ==
S_OK,
"Failed to get cached height, hr %#x.\n",
hr);
3432 ok(height2 ==
height,
"Unexpected height %u.\n", height2);
3437 ok(
hdc2 !=
NULL,
"Failed to get window dc.\n");
3450 ok(
tm.tmHeight >
height,
"Unexpected tmHeight %u.\n",
tm.tmHeight);
3454 ok(
hr ==
S_OK,
"Failed to get cached height, hr %#x.\n",
hr);
3455 ok(height2 ==
height,
"Unexpected height.\n");
3480 ok(
ret == 1,
"Failed to get glyph index.\n");
3481 ok(glyph != 0,
"Unexpected glyph index.\n");
3489 "expected E_INVALIDARG, got 0x%08x\n",
hr);
3500 ok(
hr ==
S_OK,
"expected S_OK, got 0x%08x\n",
hr);
3501 ok(
abc.
abcB != 0,
"Unexpected width.\n");
3504 ok(
ret,
"Failed to get char width.\n");
3518 ok(
ret,
"Failed to get text metrics.\n");
3524 ok(
ret == 1,
"Failed to get glyph index.\n");
3525 ok(glyph != 0,
"Unexpected glyph index.\n");
3529 ok(
hr ==
S_OK,
"Failed to get glyph width, hr %#x.\n",
hr);
3530 ok(
abc.
abcB != 0,
"Unexpected width.\n");
3533 ok(
ret,
"Failed to get char width.\n");
3549 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
3550 { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
3551 { 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 },
3552 { 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 },
3554 { 0, 0, 0, 0, 0, 1, 1, 1, 1, 1},
3555 { 1, 1, 1, 2, 2, 2, 1, 1, 1, 1 },
3556 { 2, 2, 2, 1, 1, 1, 2, 2, 2, 2 },
3557 { 0, 0, 1, 1, 2, 2, 1, 1, 0, 0 },
3558 { 1, 1, 2, 2, 3, 3, 2, 2, 1, 1 },
3560 { 0, 0, 1, 1, 2, 2, 1, 1, 0, 1 },
3561 { 1, 0, 1, 2, 2, 1, 2, 1, 0, 1 },
3563 { 1, 2, 0, 0, 0, 0, 0, 0, 0, 0 },
3564 { 2, 2, 2, 0, 0, 0, 0, 0, 0, 0 },
3565 { 2, 2, 2, 4, 4, 4, 1, 1, 0, 0 },
3566 { 1, 2, 3, 0, 3, 2, 1, 0, 0, 0 }
3568 static const int expect_l2v[][10] =
3570 { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 },
3571 { 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 },
3572 { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 },
3573 { 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 },
3575 { 0, 1, 2, 3, 4, 9, 8 ,7 ,6, 5},
3576 { 9, 8, 7, 4, 5, 6, 3 ,2 ,1, 0},
3577 { 7, 8, 9, 6, 5, 4, 0 ,1 ,2, 3},
3578 { 0, 1, 7, 6, 4, 5, 3 ,2 ,8, 9},
3579 { 9, 8, 2, 3, 5, 4, 6 ,7 ,1, 0},
3581 { 0, 1, 7, 6, 4, 5, 3 ,2 ,8, 9},
3582 { 0, 1, 7, 5, 6, 4, 3 ,2 ,8, 9},
3584 { 1, 0, 2, 3, 4, 5, 6, 7, 8, 9},
3585 { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9},
3586 { 2, 3, 4, 5, 6, 7, 1, 0, 8, 9},
3587 { 2, 0, 1, 3, 5, 6, 4, 7, 8, 9}
3589 static const int expect_v2l[][10] =
3591 { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 },
3592 { 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 },
3593 { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 },
3594 { 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 },
3596 { 0, 1, 2, 3, 4, 9, 8 ,7 ,6, 5},
3597 { 9, 8, 7, 6, 3, 4, 5 ,2 ,1, 0},
3598 { 6, 7, 8, 9, 5, 4, 3 ,0 ,1, 2},
3599 { 0, 1, 7, 6, 4, 5, 3 ,2 ,8, 9},
3600 { 9, 8, 2, 3, 5, 4, 6 ,7 ,1, 0},
3602 { 0, 1, 7, 6, 4, 5, 3 ,2 ,8, 9},
3603 { 0, 1, 7, 6, 5, 3, 4 ,2 ,8, 9},
3605 { 1, 0, 2, 3, 4, 5, 6, 7, 8, 9},
3606 { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9},
3607 { 7, 6, 0, 1, 2, 3, 4, 5, 8, 9},
3608 { 1, 2, 0, 3, 6, 4, 5, 7, 8, 9}
3611 int i,
j, vistolog[
sizeof(
levels[0])], logtovis[
sizeof(
levels[0])];
3622 ok(
hr ==
S_OK,
"expected S_OK, got 0x%08x\n",
hr);
3626 ok(expect_v2l[
i][
j] == vistolog[
j],
3627 "failure: levels[%d][%d] = %d, vistolog[%d] = %d\n",
3633 ok(expect_l2v[
i][
j] == logtovis[
j],
3634 "failure: levels[%d][%d] = %d, logtovis[%d] = %d\n",
3650 memset(&sds, 0,
sizeof(sds));
3651 memset(&sc, 0,
sizeof(sc));
3658 ok(
hr ==
S_OK,
"ScriptRecordDigitSubstitution failed: 0x%08x\n",
hr);
3661 ok(
hr ==
S_OK,
"ScriptApplyDigitSubstitution failed: 0x%08x\n",
hr);
3709 ok(
hr ==
S_OK,
"ScriptGetProperties failed: 0x%08x\n",
hr);
3712 ok(
hr ==
S_OK,
"ScriptGetProperties failed: 0x%08x\n",
hr);
3715 ok(
hr ==
S_OK,
"ScriptGetProperties failed: 0x%08x\n",
hr);
3720 static const WCHAR test[] = {
' ',
'\r',
'\n',0};
3726 ok(
hr ==
S_OK,
"ScriptItemize should return S_OK not %08x\n",
hr);
3741 memset(&la, 0,
sizeof(la));
3743 ok(
hr ==
S_OK,
"ScriptBreak should return S_OK not %08x\n",
hr);
3752 memset(&la, 0,
sizeof(la));
3754 ok(
hr ==
S_OK,
"ScriptBreak should return S_OK not %08x\n",
hr);
3763 memset(&la, 0,
sizeof(la));
3765 ok(
hr ==
S_OK,
"ScriptBreak should return S_OK not %08x\n",
hr);
3777 static const WCHAR test1[] = {
't',
'e',
'x',
't',
'\r',
't',
'e',
'x',
't',0};
3778 static const WCHAR test2[] = {
't',
'e',
'x',
't',
'\n',
't',
'e',
'x',
't',0};
3779 static const WCHAR test3[] = {
't',
'e',
'x',
't',
'\r',
'\n',
't',
'e',
'x',
't',0};
3780 static const WCHAR test4[] = {
't',
'e',
'x',
't',
'\n',
'\r',
't',
'e',
'x',
't',0};
3781 static const WCHAR test5[] = {
'1',
'2',
'3',
'4',
'\n',
'\r',
'1',
'2',
'3',
'4',0};
3788 ok(
hr ==
S_OK,
"ScriptItemize failed: 0x%08x\n",
hr);
3793 ok(
hr ==
S_OK,
"ScriptItemize failed: 0x%08x\n",
hr);
3798 ok(
hr ==
S_OK,
"ScriptItemize failed: 0x%08x\n",
hr);
3803 ok(
hr ==
S_OK,
"ScriptItemize failed: 0x%08x\n",
hr);
3808 ok(
hr ==
S_OK,
"ScriptItemize failed: 0x%08x\n",
hr);
3814 static const WCHAR test_phagspa[] = {0xa84f, 0xa861, 0xa843, 0x0020, 0xa863, 0xa861, 0xa859,
3815 0x0020, 0xa850, 0xa85c, 0xa85e};
3824 if (!pScriptGetFontScriptTags || !pScriptGetFontLanguageTags || !pScriptGetFontFeatureTags)
3826 win_skip(
"ScriptGetFontScriptTags, ScriptGetFontLanguageTags or "
3827 "ScriptGetFontFeatureTags not available on this platform.\n");
3833 ok(!sc,
"Got unexpected script cache %p.\n", sc);
3836 ok(!sc,
"Got unexpected script cache %p.\n", sc);
3839 ok(!sc,
"Got unexpected script cache %p.\n", sc);
3842 ok(!sc,
"Got unexpected script cache %p.\n", sc);
3845 ok(!sc,
"Got unexpected script cache %p.\n", sc);
3852 ok(!!sc,
"Got unexpected script cache %p.\n", sc);
3859 ok(!sc,
"Got unexpected script cache %p.\n", sc);
3862 ok(!sc,
"Got unexpected script cache %p.\n", sc);
3865 ok(!sc,
"Got unexpected script cache %p.\n", sc);
3868 ok(!sc,
"Got unexpected script cache %p.\n", sc);
3871 ok(!sc,
"Got unexpected script cache %p.\n", sc);
3884 ok(!sc,
"Got unexpected script cache %p.\n", sc);
3887 ok(!sc,
"Got unexpected script cache %p.\n", sc);
3890 ok(!sc,
"Got unexpected script cache %p.\n", sc);
3893 ok(!sc,
"Got unexpected script cache %p.\n", sc);
3896 ok(!sc,
"Got unexpected script cache %p.\n", sc);
3909 ok(
hr ==
S_OK,
"Got unexpected hr %#x.\n",
hr);
3915 ok(
hr ==
S_OK,
"Got unexpected hr %#x.\n",
hr);
3920 ok(
hr ==
S_OK,
"Got unexpected hr %#x.\n",
hr);
3942 { 3, 3, { 6, 9, 12 }, { 0, 1, 2 }, { 6, 9, 12 }, { 1, 1, 1 } },
3943 { 3, 3, { 6, 9, 12 }, { 0, 1, 2 }, { 6, 9, 12 }, { 1, 1, 1 }, { 1, 0, 0 } },
3944 { 3, 3, { 6, 9, 12 }, { 0, 1, 2 }, { 6, 9, 12 }, { 1, 1, 1 }, { 0 }, { 1, 1, 1 } },
3945 { 3, 3, { 6, 9, 12 }, { 0, 1, 2 }, { 27, 21, 12 }, { 0, 0, 0 }, { 0 }, { 0 },
TRUE },
3946 { 3, 3, { 6, 9, 12 }, { 0, 1, 2 }, { 6, 21, 12 }, { 0, 1, 0 }, { 0 }, { 0 },
TRUE },
3947 { 3, 3, { 6, 9, 12 }, { 0, 1, 2 }, { 6, 21, 12 }, { 1, 1, 0 }, { 0 }, { 0 },
TRUE },
3948 { 3, 3, { 6, 9, 12 }, { 0, 2, 2 }, { 15, 6, 6 }, { 1, 0, 1 } },
3963 memset(attrs, 0,
sizeof(attrs));
3964 for (
j = 0;
j <
ptr->glyph_count;
j++)
3981 static const WCHAR testW[] = {0x202a,
'1',0x202c,0};
3982 static const WCHAR test2W[] = {
'1',0};
3983 static const struct complex_test
4021 ok(
hr == complex_tests[
i].
hr,
"%u: got %#x, expected %#x, flags %#x\n",
i,
hr, complex_tests[
i].
hr,
4050 hr =
ScriptStringAnalyse(
hdc,
textW, 1, 16, -1,
SSA_GLYPHS, 0,
NULL,
NULL,
NULL,
NULL,
NULL, &ssa);
4051 ok(
hr ==
S_OK,
"ScriptStringAnalyse failed, hr %#x.\n",
hr);
4060 ok(
tm.tmHeight > 0,
"Unexpected tmHeight.\n");
4063 ok(
size !=
NULL,
"Unexpected size pointer.\n");
4065 ok(
size->cy ==
tm.tmHeight,
"Unexpected cy size %d.\n",
size->cy);
4068 ok(
hr ==
S_OK,
"Failed to free ssa, hr %#x.\n",
hr);
4077 HFONT hfont1, hfont2;
4078 HFONT prev_hfont1, prev_hfont2;
4095 ok(hfont1 !=
NULL,
"CreateFontIndirectA failed\n");
4097 ok(hfont2 !=
NULL,
"CreateFontIndirectA failed\n");
4098 ok(hfont1 != hfont2,
"Expected fonts %p and %p to differ\n", hfont1, hfont2);
4101 ok(prev_hfont1 !=
NULL,
"SelectObject failed: %p\n", prev_hfont1);
4103 ok(prev_hfont2 !=
NULL,
"SelectObject failed: %p\n", prev_hfont2);
4107 ok(
hr ==
S_OK,
"expected S_OK, got 0x%08x\n",
hr);
4108 ok(sc !=
NULL,
"Script cache is NULL\n");
4113 ok(
hr ==
S_OK,
"expected S_OK, got 0x%08x\n",
hr);
4114 ok(sc2 !=
NULL,
"Script cache is NULL\n");
4115 ok(sc == sc2,
"Expected caches %p, %p to be identical\n", sc, sc2);
4121 ok(
hr ==
S_OK,
"expected S_OK, got 0x%08x\n",
hr);
4122 ok(sc2 !=
NULL,
"Script cache is NULL\n");
4123 ok(sc == sc2,
"Expected caches %p, %p to be identical\n", sc, sc2);
4132 ok(
hr ==
S_OK,
"expected S_OK, got 0x%08x\n",
hr);
4133 ok(sc2 !=
NULL,
"Script cache is NULL\n");
4134 ok(sc == sc2,
"Expected caches %p, %p to be identical\n", sc, sc2);
4139 ok(
hr ==
S_OK,
"expected S_OK, got 0x%08x\n",
hr);
4140 ok(sc2 !=
NULL,
"Script cache is NULL\n");
4141 ok(sc == sc2,
"Expected caches %p, %p to be identical\n", sc, sc2);
4150 ok(hfont2 !=
NULL,
"CreateFontIndirectA failed\n");
4156 ok(
hr ==
S_OK,
"expected S_OK, got 0x%08x\n",
hr);
4157 ok(sc2 !=
NULL,
"Script cache is NULL\n");
4158 ok(sc != sc2,
"Expected caches %p, %p to be different\n", sc, sc2);
4163 ok(
hr ==
S_OK,
"expected S_OK, got 0x%08x\n",
hr);
4164 ok(sc2 !=
NULL,
"Script cache is NULL\n");
4165 ok(sc != sc2,
"Expected caches %p, %p to be different\n", sc, sc2);
4181 ok(
module != 0,
"Expected usp10.dll to be loaded.\n");
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)
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
ACPI_SIZE strlen(const char *String)
static struct sockaddr_in sa
#define GetProcAddress(x, y)
#define HeapFree(x, y, z)
static void cleanup(void)
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
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)
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 ScriptStringFree(SCRIPT_STRING_ANALYSIS *pssa)
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)
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 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)
static const FxOffsetAndName offsets[]
GLint GLint GLint GLint GLint x
GLuint GLuint GLsizei count
GLuint GLuint GLsizei GLenum type
GLint GLint GLsizei GLsizei height
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
static const WCHAR testW[]
LPSTR WINAPI lstrcpyA(LPSTR lpString1, LPCSTR lpString2)
#define memcpy(s1, s2, n)
static const WCHAR textW[]
static CRYPT_DATA_BLOB b2[]
static UINT UINT LPWORD LPABC abc
static WORD system_lang_id
static UINT UINT LPWORD glyphs
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
static CHAR string2[MAX_PATH]
#define todo_wine_if(is_todo)
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 SCRIPT_CACHE SCRIPT_ANALYSIS OPENTYPE_TAG OPENTYPE_TAG int TEXTRANGE_PROPERTIES int const WCHAR int cChars
static void test_ScriptCacheGetHeight(HDC hdc)
static SCRIPT_CACHE SCRIPT_ANALYSIS OPENTYPE_TAG tagScript
#define test_shape_ok_valid(v, a, b, c, d, e, f, g, h, i)
static void test_ScriptShape(HDC hdc)
static SCRIPT_CACHE SCRIPT_ANALYSIS * psa
static void test_ScriptString_pSize(HDC hdc)
static SCRIPT_CACHE * psc
static void test_ScriptGetFontProperties(HDC hdc)
static SCRIPT_CACHE SCRIPT_ANALYSIS OPENTYPE_TAG int OPENTYPE_TAG * pLangSysTags
static void test_ScriptIsComplex(void)
static void init_tests(void)
static SCRIPT_CACHE SCRIPT_ANALYSIS OPENTYPE_TAG OPENTYPE_TAG int TEXTRANGE_PROPERTIES int const WCHAR int int WORD SCRIPT_CHARPROP WORD SCRIPT_GLYPHPROP int * pcGlyphs
static INT CALLBACK enum_bitmap_font_proc(const LOGFONTA *lf, const TEXTMETRICA *ntm, DWORD type, LPARAM lParam)
static SCRIPT_CACHE SCRIPT_ANALYSIS OPENTYPE_TAG OPENTYPE_TAG int OPENTYPE_TAG * pFeatureTags
static SCRIPT_CACHE SCRIPT_ANALYSIS OPENTYPE_TAG OPENTYPE_TAG int TEXTRANGE_PROPERTIES int const WCHAR int int WORD SCRIPT_CHARPROP WORD SCRIPT_GLYPHPROP * pOutGlyphProps
static void test_ScriptGetGlyphABCWidth(HDC hdc)
static int int const SCRIPT_CONTROL const SCRIPT_STATE SCRIPT_ITEM * pItems
static int int const SCRIPT_CONTROL const SCRIPT_STATE SCRIPT_ITEM ULONG * pScriptTags
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)
static int int const SCRIPT_CONTROL const SCRIPT_STATE * psState
static SCRIPT_CACHE SCRIPT_ANALYSIS OPENTYPE_TAG OPENTYPE_TAG int TEXTRANGE_PROPERTIES int const WCHAR int int WORD * pwLogClust
#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 SCRIPT_CACHE SCRIPT_ANALYSIS int cMaxTags
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)
static SCRIPT_CACHE SCRIPT_ANALYSIS OPENTYPE_TAG OPENTYPE_TAG int TEXTRANGE_PROPERTIES int const WCHAR int int WORD SCRIPT_CHARPROP WORD * pwOutGlyphs
struct tagRangeP fontEnumParam
static SCRIPT_CACHE SCRIPT_ANALYSIS int OPENTYPE_TAG int * pcTags
static void test_ScriptGetCMap(HDC hdc, unsigned short pwOutGlyphs[256])
static int int const SCRIPT_CONTROL const SCRIPT_STATE SCRIPT_ITEM ULONG int * pcItems
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 SCRIPT_CACHE SCRIPT_ANALYSIS OPENTYPE_TAG OPENTYPE_TAG int TEXTRANGE_PROPERTIES int const WCHAR int int cMaxGlyphs
static BOOL CALLBACK enum_proc(LGRPID group, LCID lcid, LPSTR locale, LONG_PTR lparam)
static void test_newlines(void)
static SCRIPT_CACHE SCRIPT_ANALYSIS OPENTYPE_TAG OPENTYPE_TAG int TEXTRANGE_PROPERTIES int cRanges
static void test_ScriptShapeOpenType(HDC hdc)
static int int const SCRIPT_CONTROL * psControl
static SCRIPT_CACHE SCRIPT_ANALYSIS OPENTYPE_TAG OPENTYPE_TAG int TEXTRANGE_PROPERTIES ** rpRangeProperties
static SCRIPT_CACHE SCRIPT_ANALYSIS OPENTYPE_TAG OPENTYPE_TAG int * rcRangeChars
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)
static SCRIPT_CACHE SCRIPT_ANALYSIS OPENTYPE_TAG OPENTYPE_TAG int TEXTRANGE_PROPERTIES int const WCHAR * pwcChars
#define test_shape_ok(a, b, c, d, e, f, g, h, i)
static SCRIPT_CACHE SCRIPT_ANALYSIS OPENTYPE_TAG OPENTYPE_TAG tagLangSys
static void test_ScriptTextOut(HDC hdc)
static void test_ScriptTextOut3(HDC hdc)
#define test_item_ScriptXtoX(a, b, c, d, e, f)
static SCRIPT_CACHE SCRIPT_ANALYSIS OPENTYPE_TAG OPENTYPE_TAG int TEXTRANGE_PROPERTIES int const WCHAR int int WORD SCRIPT_CHARPROP * pCharProps
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)
void __winetest_cdecl winetest_win_skip(const char *msg,...)
void __winetest_cdecl winetest_skip(const char *msg,...)
void __winetest_cdecl winetest_ok(int condition, const char *msg,...)
void __winetest_cdecl winetest_trace(const char *msg,...)
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
@ SCRIPT_JUSTIFY_ARABIC_SEEN
@ SCRIPT_JUSTIFY_ARABIC_NORMAL
@ SCRIPT_JUSTIFY_CHARACTER
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_ PCCERT_CONTEXT _In_ DWORD dwFlags
_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
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)
_Must_inspect_result_ _In_ ULONG Flags