Commit e94264e6 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

dwrite: Improve SetScriptAnalysis()/SetBidiLevel() tracing.

parent 8d9bf23f
...@@ -177,6 +177,11 @@ static const struct dwritescript_properties dwritescripts_properties[Script_Last ...@@ -177,6 +177,11 @@ static const struct dwritescript_properties dwritescripts_properties[Script_Last
}; };
#undef _OT #undef _OT
const char *debugstr_sa_script(UINT16 script)
{
return script < Script_LastId ? debugstr_an((char*)&dwritescripts_properties[script].props.isoScriptCode, 4): "not defined";
}
struct dwrite_numbersubstitution { struct dwrite_numbersubstitution {
IDWriteNumberSubstitution IDWriteNumberSubstitution_iface; IDWriteNumberSubstitution IDWriteNumberSubstitution_iface;
LONG ref; LONG ref;
......
...@@ -99,6 +99,8 @@ static inline const char *debugstr_matrix(const DWRITE_MATRIX *m) ...@@ -99,6 +99,8 @@ static inline const char *debugstr_matrix(const DWRITE_MATRIX *m)
m->dx, m->dy); m->dx, m->dy);
} }
const char *debugstr_sa_script(UINT16) DECLSPEC_HIDDEN;
static inline unsigned short get_table_entry(const unsigned short *table, WCHAR ch) static inline unsigned short get_table_entry(const unsigned short *table, WCHAR ch)
{ {
return table[table[table[ch >> 8] + ((ch >> 4) & 0x0f)] + (ch & 0xf)]; return table[table[table[ch >> 8] + ((ch >> 4) & 0x0f)] + (ch & 0xf)];
......
...@@ -3977,7 +3977,7 @@ static HRESULT WINAPI dwritetextlayout_sink_SetScriptAnalysis(IDWriteTextAnalysi ...@@ -3977,7 +3977,7 @@ static HRESULT WINAPI dwritetextlayout_sink_SetScriptAnalysis(IDWriteTextAnalysi
struct dwrite_textlayout *layout = impl_from_IDWriteTextAnalysisSink1(iface); struct dwrite_textlayout *layout = impl_from_IDWriteTextAnalysisSink1(iface);
struct layout_run *run; struct layout_run *run;
TRACE("%u %u script=%d\n", position, length, sa->script); TRACE("[%u,%u) script=%u:%s\n", position, position + length, sa->script, debugstr_sa_script(sa->script));
run = alloc_layout_run(LAYOUT_RUN_REGULAR); run = alloc_layout_run(LAYOUT_RUN_REGULAR);
if (!run) if (!run)
...@@ -4009,7 +4009,7 @@ static HRESULT WINAPI dwritetextlayout_sink_SetBidiLevel(IDWriteTextAnalysisSink ...@@ -4009,7 +4009,7 @@ static HRESULT WINAPI dwritetextlayout_sink_SetBidiLevel(IDWriteTextAnalysisSink
struct dwrite_textlayout *layout = impl_from_IDWriteTextAnalysisSink1(iface); struct dwrite_textlayout *layout = impl_from_IDWriteTextAnalysisSink1(iface);
struct layout_run *cur_run; struct layout_run *cur_run;
TRACE("%u %u %u %u\n", position, length, explicitLevel, resolvedLevel); TRACE("[%u,%u) %u %u\n", position, position + length, explicitLevel, resolvedLevel);
LIST_FOR_EACH_ENTRY(cur_run, &layout->runs, struct layout_run, entry) { LIST_FOR_EACH_ENTRY(cur_run, &layout->runs, struct layout_run, entry) {
struct regular_layout_run *cur = &cur_run->u.regular; struct regular_layout_run *cur = &cur_run->u.regular;
......
...@@ -1410,7 +1410,7 @@ static const struct drawcall_entry draw_seq2[] = { ...@@ -1410,7 +1410,7 @@ static const struct drawcall_entry draw_seq2[] = {
}; };
static const struct drawcall_entry draw_seq3[] = { static const struct drawcall_entry draw_seq3[] = {
{ DRAW_GLYPHRUN }, { DRAW_GLYPHRUN, {0x202a,0x202c,0} },
{ DRAW_GLYPHRUN, {'a','b',0} }, { DRAW_GLYPHRUN, {'a','b',0} },
{ DRAW_LAST_KIND } { DRAW_LAST_KIND }
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment