[6/6] gdi32: Substitute glyph for vertical font only.

Kusanagi Kouichi slash at ac.auone-net.jp
Tue Dec 20 06:06:00 CST 2011


Signed-off-by: Kusanagi Kouichi <slash at ac.auone-net.jp>
---
 dlls/gdi32/freetype.c   |    4 +++-
 dlls/gdi32/tests/font.c |    1 -
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c
index d9607e6..b907209 100644
--- a/dlls/gdi32/freetype.c
+++ b/dlls/gdi32/freetype.c
@@ -269,6 +269,7 @@ typedef struct tagFace {
     DWORD ntmFlags;
     FT_Fixed font_version;
     BOOL scalable;
+    BOOL vertical;
     Bitmap_Size size;     /* set if face is a bitmap */
     BOOL external; /* TRUE if we should manually add this font to the registry */
     struct tagFamily *family;
@@ -1619,6 +1620,7 @@ static void AddFaceToList(FT_Face ft_face, char *fake_family, const char *file,
         if (face->ntmFlags == 0) face->ntmFlags = NTM_REGULAR;
         face->font_version = pHeader ? pHeader->Font_Revision : 0;
         face->family = family;
+        face->vertical = vertical;
         face->external = (flags & ADDFONT_EXTERNAL_FONT) ? TRUE : FALSE;
         face->fs = fs;
         memset(&face->fs_links, 0, sizeof(face->fs_links));
@@ -4248,7 +4250,7 @@ found_face:
     ret->strikeout = lf.lfStrikeOut ? 0xff : 0;
     create_child_font_list(ret);
 
-    if (lf.lfFaceName[0]=='@') /* We need to try to load the GSUB table */
+    if (face->vertical) /* We need to try to load the GSUB table */
     {
         int length = get_font_data(ret, GSUB_TAG , 0, NULL, 0);
         if (length != GDI_ERROR)
diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c
index 710ee56..4d53aaf 100644
--- a/dlls/gdi32/tests/font.c
+++ b/dlls/gdi32/tests/font.c
@@ -4126,7 +4126,6 @@ static void test_vertical_font(void)
     check_vertical_font("@WineTestVertical", &installed, &selected, &gm);
     ok(installed, "@WineTestVertical is not installed\n");
     ok(selected, "@WineTestVertical is not selected\n");
-    todo_wine
     ok(gm.gmBlackBoxX > gm.gmBlackBoxY,
        "gmBlackBoxX(%u) should be greater than gmBlackBoxY(%u) if horizontal\n",
        gm.gmBlackBoxX, gm.gmBlackBoxY);
-- 
1.7.7.3




More information about the wine-patches mailing list