usp10/tests: Add Hiragana shaping test.

This commit is contained in:
Ziqing Hui 2022-11-03 12:48:07 +08:00 committed by Alexandre Julliard
parent 1e07b77b51
commit 0e7415389c

View file

@ -1617,6 +1617,14 @@ static void test_ScriptShapeOpenType(HDC hdc)
{1,{{SCRIPT_JUSTIFY_NONE,1,0,0,0,0},0}},
{1,{{SCRIPT_JUSTIFY_NONE,0,0,0,0,0},0}} };
/* Hiragana */
static const WCHAR test_hiragana[] = {0x306b, 0x307b, 0x3093, 0x3054};
static const shapeTest_char hiragana_c[] = {{0,{0,0}},{1,{0,0}},{2,{0,0}},{3,{0,0}}};
static const shapeTest_glyph hiragana_g[] = {
{1,{{SCRIPT_JUSTIFY_CHARACTER,1,0,0,0,0},0}},
{1,{{SCRIPT_JUSTIFY_CHARACTER,1,0,0,0,0},0}},
{1,{{SCRIPT_JUSTIFY_CHARACTER,1,0,0,0,0},0}},
{1,{{SCRIPT_JUSTIFY_CHARACTER,1,0,0,0,0},0}} };
/* CJK */
static const WCHAR test_cjk[] = {0x4e2d, 0x6587, 0x65e5, 0x672c, 0x8a9e};
static const shapeTest_char cjk_c[] = {{0,{0,0}},{1,{0,0}},{2,{0,0}},{3,{0,0}},{4,{0,0}}};
@ -1812,6 +1820,14 @@ static void test_ScriptShapeOpenType(HDC hdc)
DeleteObject(hfont);
}
test_valid = find_font_for_range(hdc, "SimSun", 49, test_hiragana[0], &hfont, &hfont_orig, NULL);
if (hfont != NULL)
{
test_shape_ok_valid(test_valid, hdc, test_hiragana, 4, &Control, &State, 0, 4, hiragana_c, hiragana_g);
SelectObject(hdc, hfont_orig);
DeleteObject(hfont);
}
test_valid = find_font_for_range(hdc, "SimSun", 59, test_cjk[0], &hfont, &hfont_orig, NULL);
if (hfont != NULL)
{