[0.4.11][WIN32SS:NTGDI] Fix missing text in labels and buttons for .NET apps.
authorJoachim Henze <Joachim.Henze@reactos.org>
Tue, 3 Nov 2020 13:19:08 +0000 (14:19 +0100)
committerJoachim Henze <Joachim.Henze@reactos.org>
Tue, 3 Nov 2020 13:19:08 +0000 (14:19 +0100)
Fixes CORE-15000 "Totally Broken/messed up text in many .NET applications"
and its duplicates
CORE-14679 "Missing fonts in Reg Organizer 8.16"
CORE-15398 "Messed fonts in Microsoft SQL Server 2005 Express Edition"
CORE-15611 "Word 2003: Organization Chart has corrupted display"

There was a missing break statement in ftGdiGetGlyphOutline().
Found by JIRA contributor 'I_Kill_Bugs' :-)

Add also brackets around 'case's to make code navigation easier.

Fix picked from 0.4.12-dev-865-g
0e56ec8892a737823b4b008f02ae0261cbf0b64a

win32ss/gdi/ntgdi/freetype.c

index 744db67..549849e 100644 (file)
@@ -3775,6 +3775,7 @@ ftGdiGetGlyphOutline(
     switch (iFormat)
     {
     case GGO_BITMAP:
+    {
         width = gm.gmBlackBoxX;
         height = gm.gmBlackBoxY;
         pitch = ((width + 31) >> 5) << 2;
@@ -3802,6 +3803,7 @@ ftGdiGetGlyphOutline(
         }
 
         case ft_glyph_format_outline:
+        {
             ft_bitmap.width = width;
             ft_bitmap.rows = height;
             ft_bitmap.pitch = pitch;
@@ -3819,12 +3821,15 @@ ftGdiGetGlyphOutline(
             FT_Outline_Get_Bitmap(g_FreeTypeLibrary, &ft_face->glyph->outline, &ft_bitmap);
             IntUnLockFreeType();
             break;
+        }
 
         default:
             DPRINT1("Loaded glyph format %x\n", ft_face->glyph->format);
             return GDI_ERROR;
         }
+
         break;
+    }
 
     case GGO_GRAY2_BITMAP:
     case GGO_GRAY4_BITMAP:
@@ -3910,6 +3915,8 @@ ftGdiGetGlyphOutline(
             DPRINT1("Loaded glyph format %x\n", ft_face->glyph->format);
             return GDI_ERROR;
         }
+
+        break;
     }
 
     case GGO_NATIVE:
@@ -3937,6 +3944,7 @@ ftGdiGetGlyphOutline(
         IntUnLockFreeType();
         break;
     }
+
     case GGO_BEZIER:
     {
         FT_Outline *outline = &ft_face->glyph->outline;