Nikolay Sivov : dwrite: Fix EndFigure notification in GetGlyphRunOutline() .

Alexandre Julliard julliard at wine.codeweavers.com
Mon Jul 13 09:30:03 CDT 2015


Module: wine
Branch: master
Commit: 2b59cf84be0049fe3bf75badc6698495c0519973
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=2b59cf84be0049fe3bf75badc6698495c0519973

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Sun Jul 12 23:37:05 2015 +0300

dwrite: Fix EndFigure notification in GetGlyphRunOutline().

---

 dlls/dwrite/freetype.c | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/dlls/dwrite/freetype.c b/dlls/dwrite/freetype.c
index bf6c866..778f9cf 100644
--- a/dlls/dwrite/freetype.c
+++ b/dlls/dwrite/freetype.c
@@ -297,12 +297,6 @@ static void get_cubic_glyph_outline(const FT_Outline *outline, short point, shor
     cubic_control[2].y += (cubic_control[3].y + 1) / 3;
 }
 
-static inline void set_outline_end_tag(short point, short endpoint, UINT8 *tag)
-{
-    if (point == endpoint)
-        *tag |= OUTLINE_POINT_END;
-}
-
 static short get_outline_data(const FT_Outline *outline, struct glyph_outline *ret)
 {
     short contour, point = 0, first_pt, count;
@@ -312,6 +306,8 @@ static short get_outline_data(const FT_Outline *outline, struct glyph_outline *r
         if (ret) {
             ft_vector_to_d2d_point(&outline->points[point], &ret->points[count]);
             ret->tags[count] = OUTLINE_POINT_START;
+            if (count)
+                ret->tags[count-1] |= OUTLINE_POINT_END;
         }
 
         point++;
@@ -323,7 +319,6 @@ static short get_outline_data(const FT_Outline *outline, struct glyph_outline *r
                     if (ret) {
                         ft_vector_to_d2d_point(&outline->points[point], &ret->points[count]);
                         ret->tags[count] |= OUTLINE_POINT_LINE;
-                        set_outline_end_tag(point, outline->contours[contour], &ret->tags[count]);
                     }
 
                     point++;
@@ -341,7 +336,6 @@ static short get_outline_data(const FT_Outline *outline, struct glyph_outline *r
                         ret->tags[count] = OUTLINE_POINT_BEZIER;
                         ret->tags[count+1] = OUTLINE_POINT_BEZIER;
                         ret->tags[count+2] = OUTLINE_POINT_BEZIER;
-                        set_outline_end_tag(point, outline->contours[contour], &ret->tags[count+2]);
                     }
 
                     count += 3;
@@ -361,6 +355,9 @@ static short get_outline_data(const FT_Outline *outline, struct glyph_outline *r
         }
     }
 
+    if (ret)
+        ret->tags[count-1] |= OUTLINE_POINT_END;
+
     return count;
 }
 




More information about the wine-cvs mailing list