Nikolay Sivov : dwrite/tests: Added a drawing test for run reordering case.
Alexandre Julliard
julliard at wine.codeweavers.com
Tue Feb 9 10:46:51 CST 2016
Module: wine
Branch: master
Commit: 79fa94c3c288cca7698a858b63d8470bda197595
URL: http://source.winehq.org/git/wine.git/?a=commit;h=79fa94c3c288cca7698a858b63d8470bda197595
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Tue Feb 9 17:11:18 2016 +0300
dwrite/tests: Added a drawing test for run reordering case.
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/dwrite/tests/layout.c | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/dlls/dwrite/tests/layout.c b/dlls/dwrite/tests/layout.c
index 04e3ee0..89a6305 100644
--- a/dlls/dwrite/tests/layout.c
+++ b/dlls/dwrite/tests/layout.c
@@ -1439,8 +1439,18 @@ static const struct drawcall_entry draw_single_run_seq[] = {
{ DRAW_LAST_KIND }
};
+static const struct drawcall_entry draw_reordered_run_seq[] = {
+ { DRAW_GLYPHRUN, {'1','2','3','-','5','2',0} },
+ { DRAW_GLYPHRUN, {0x64a,0x64f,0x633,0x627,0x648,0x650,0x64a,0} },
+ { DRAW_GLYPHRUN, {'7','1',0} },
+ { DRAW_GLYPHRUN, {'.',0} },
+ { DRAW_LAST_KIND }
+};
+
static void test_Draw(void)
{
+ static const WCHAR str3W[] = {'1','2','3','-','5','2',0x64a,0x64f,0x633,0x627,0x648,0x650,
+ 0x64a,'7','1','.',0};
static const WCHAR strW[] = {'s','t','r','i','n','g',0};
static const WCHAR str2W[] = {0x202a,0x202c,'a','b',0};
static const WCHAR ruW[] = {'r','u',0};
@@ -1623,6 +1633,22 @@ static void test_Draw(void)
IDWriteTextLayout_Release(layout);
IDWriteInlineObject_Release(inlineobj);
+
+ /* text that triggers bidi run reordering */
+ hr = IDWriteFactory_CreateTextLayout(factory, str3W, lstrlenW(str3W), format, 1000.0f, 100.0f, &layout);
+ ok(hr == S_OK, "got 0x%08x\n", hr);
+
+ ctxt.gdicompat = FALSE;
+ ctxt.use_gdi_natural = FALSE;
+ ctxt.snapping_disabled = TRUE;
+
+ flush_sequence(sequences, RENDERER_ID);
+ hr = IDWriteTextLayout_Draw(layout, &ctxt, &testrenderer, 0.0f, 0.0f);
+ ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok_sequence(sequences, RENDERER_ID, draw_reordered_run_seq, "draw test 11", FALSE);
+
+ IDWriteTextLayout_Release(layout);
+
IDWriteTextFormat_Release(format);
IDWriteFactory_Release(factory);
}
More information about the wine-cvs
mailing list