Commit 096df5f5 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

dwrite: Support DWRITE_TRIMMING_GRANULARITY_WORD mode.

parent 9058fc0a
......@@ -1879,7 +1879,15 @@ static void layout_add_line(struct dwrite_textlayout *layout, UINT32 first_clust
while (last_cluster > first_cluster) {
if (trimmed_width + sign_metrics.width <= layout->metrics.layoutWidth)
break;
trimmed_width -= layout->clustermetrics[last_cluster--].width;
if (layout->format.trimming.granularity == DWRITE_TRIMMING_GRANULARITY_CHARACTER)
trimmed_width -= layout->clustermetrics[last_cluster--].width;
else {
while (last_cluster > first_cluster) {
trimmed_width -= layout->clustermetrics[last_cluster].width;
if (layout->clustermetrics[last_cluster--].canWrapLineAfter)
break;
}
}
}
append_trimming_run = TRUE;
}
......
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