mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-06 08:54:05 +00:00
dwrite: Set initial justification value for default shaper.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
This commit is contained in:
parent
33c56be5ae
commit
c8592b97e3
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue