Nikolay Sivov : dwrite: Update line breaking logic with Unicode 11.0.0 changes.

Alexandre Julliard julliard at winehq.org
Tue Nov 6 15:10:05 CST 2018


Module: wine
Branch: master
Commit: 41cba1dcd58911a3b8867876d28e949451680cd7
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=41cba1dcd58911a3b8867876d28e949451680cd7

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Tue Nov  6 18:01:37 2018 +0300

dwrite: Update line breaking logic with Unicode 11.0.0 changes.

Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/dwrite/analyzer.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/dlls/dwrite/analyzer.c b/dlls/dwrite/analyzer.c
index 19214ee..5547531 100644
--- a/dlls/dwrite/analyzer.c
+++ b/dlls/dwrite/analyzer.c
@@ -517,7 +517,7 @@ static HRESULT analyze_linebreaks(const WCHAR *text, UINT32 count, DWRITE_LINE_B
     {
         switch (break_class[i])
         {
-            /* LB7 - do not break before spaces */
+            /* LB7 - do not break before spaces or zero-width space */
             case b_SP:
                 set_break_condition(i, BreakConditionBefore, DWRITE_BREAK_CONDITION_MAY_NOT_BREAK, &state);
                 break;
@@ -531,10 +531,9 @@ static HRESULT analyze_linebreaks(const WCHAR *text, UINT32 count, DWRITE_LINE_B
                 if (j < count-1 && break_class[j+1] != b_ZW)
                     set_break_condition(j, BreakConditionAfter, DWRITE_BREAK_CONDITION_CAN_BREAK, &state);
                 break;
-            /* LB8a - do not break between ZWJ and an ideograph, emoji base or emoji modifier */
+            /* LB8a - do not break after ZWJ */
             case b_ZWJ:
-                if (i < count-1 && (break_class[i+1] == b_ID || break_class[i+1] == b_EB || break_class[i+1] == b_EM))
-                    set_break_condition(i, BreakConditionAfter, DWRITE_BREAK_CONDITION_MAY_NOT_BREAK, &state);
+                set_break_condition(i, BreakConditionAfter, DWRITE_BREAK_CONDITION_MAY_NOT_BREAK, &state);
                 break;
         }
     }




More information about the wine-cvs mailing list