dwrite: Reuse linebreaking whitespace flag when filling cluster metrics.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2016-01-26 15:44:45 +03:00 committed by Alexandre Julliard
parent 0b7f857845
commit 00766538c5
1 changed files with 1 additions and 4 deletions

View File

@ -612,10 +612,7 @@ static inline void init_cluster_metrics(const struct dwrite_textlayout *layout,
metrics->canWrapLineAfter = breakcondition == DWRITE_BREAK_CONDITION_CAN_BREAK ||
breakcondition == DWRITE_BREAK_CONDITION_MUST_BREAK;
if (metrics->length == 1) {
WORD type = 0;
GetStringTypeW(CT_CTYPE1, &layout->str[position], 1, &type);
metrics->isWhitespace = !!(type & C1_SPACE);
metrics->isWhitespace = get_effective_breakpoint(layout, position).isWhitespace;
metrics->isNewline = FALSE /* FIXME */;
metrics->isSoftHyphen = layout->str[position] == 0x00ad /* Unicode Soft Hyphen */;
}