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

dwrite: Reuse linebreaking whitespace flag when filling cluster metrics.

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