Commit c8592b97 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard
Browse files

dwrite: Set initial justification value for default shaper.



Signed-off-by: default avatarNikolay Sivov <nsivov@codeweavers.com>
parent 33c56be5
Pipeline #1945 skipped
......@@ -200,7 +200,22 @@ static void shape_merge_features(struct scriptshaping_context *context, struct s
features->count = j + 1;
}
static const struct shaper null_shaper;
static void default_shaper_setup_masks(struct scriptshaping_context *context,
const struct shaping_features *features)
{
unsigned int i;
for (i = 0; i < context->glyph_count; ++i)
{
context->u.buffer.glyph_props[i].justification = iswspace(context->glyph_infos[i].codepoint) ?
SCRIPT_JUSTIFY_BLANK : SCRIPT_JUSTIFY_CHARACTER;
}
}
static const struct shaper default_shaper =
{
.setup_masks = default_shaper_setup_masks
};
static void shape_set_shaper(struct scriptshaping_context *context)
{
......@@ -211,7 +226,7 @@ static void shape_set_shaper(struct scriptshaping_context *context)
context->shaper = &arabic_shaper;
break;
default:
context->shaper = &null_shaper;
context->shaper = &default_shaper;
}
}
......
......@@ -183,6 +183,6 @@ static void arabic_setup_masks(struct scriptshaping_context *context,
const struct shaper arabic_shaper =
{
arabic_collect_features,
arabic_setup_masks,
.collect_features = arabic_collect_features,
.setup_masks = arabic_setup_masks,
};
......@@ -2904,9 +2904,6 @@ static void test_glyph_justification_property(void)
unsigned int i, j;
HRESULT hr;
if (!strcmp(winetest_platform, "wine"))
return;
analyzer = create_text_analyzer(&IID_IDWriteTextAnalyzer);
ok(!!analyzer, "Failed to create analyzer instance.\n");
......@@ -2914,6 +2911,9 @@ static void test_glyph_justification_property(void)
for (i = 0; i < ARRAY_SIZE(tests); ++i)
{
if (tests[i].script == Script_Arabic && !strcmp(winetest_platform, "wine"))
continue;
winetest_push_context("Test %s", debugstr_w(tests[i].text));
sa.script = tests[i].script;
......
Supports Markdown
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