Alexandre Julliard : wineconsole: Try harder to get a scalable font.

Alexandre Julliard julliard at winehq.org
Wed Oct 10 15:41:01 CDT 2018


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Wed Oct 10 20:43:02 2018 +0200

wineconsole: Try harder to get a scalable font.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 programs/wineconsole/user.c | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/programs/wineconsole/user.c b/programs/wineconsole/user.c
index 0b29157..a515501 100644
--- a/programs/wineconsole/user.c
+++ b/programs/wineconsole/user.c
@@ -338,6 +338,9 @@ BOOL WCUSER_ValidateFontMetric(const struct inner_data* data, const TEXTMETRICW*
     switch (pass)  /* we get increasingly lenient in later passes */
     {
     case 0:
+        if (type & RASTER_FONTTYPE) return FALSE;
+        /* fall through */
+    case 1:
         if (type & RASTER_FONTTYPE)
         {
             if (tm->tmMaxCharWidth * data->curcfg.win_width >= GetSystemMetrics(SM_CXSCREEN) ||
@@ -345,10 +348,10 @@ BOOL WCUSER_ValidateFontMetric(const struct inner_data* data, const TEXTMETRICW*
                 return FALSE;
         }
         /* fall through */
-    case 1:
+    case 2:
         if (tm->tmCharSet != DEFAULT_CHARSET && tm->tmCharSet != g_uiDefaultCharset) return FALSE;
         /* fall through */
-    case 2:
+    case 3:
         if (tm->tmItalic || tm->tmUnderlined || tm->tmStruckOut) return FALSE;
         break;
     }
@@ -366,12 +369,13 @@ BOOL WCUSER_ValidateFont(const struct inner_data* data, const LOGFONTW* lf, int
     {
     case 0:
     case 1:
+    case 2:
         if (lf->lfCharSet != DEFAULT_CHARSET && lf->lfCharSet != g_uiDefaultCharset) return FALSE;
         /* fall through */
-    case 2:
+    case 3:
         if ((lf->lfPitchAndFamily & 3) != FIXED_PITCH) return FALSE;
         /* fall through */
-    case 3:
+    case 4:
         if (lf->lfFaceName[0] == '@') return FALSE;
         break;
     }
@@ -554,7 +558,7 @@ static void     WCUSER_SetFontPmt(struct inner_data* data, const WCHAR* font,
     WINE_WARN("Couldn't match the font from registry... trying to find one\n");
     fc.data = data;
     fc.done = FALSE;
-    for (fc.pass = 0; fc.pass <= 4; fc.pass++)
+    for (fc.pass = 0; fc.pass <= 5; fc.pass++)
     {
         EnumFontFamiliesW(PRIVATE(data)->hMemDC, NULL, get_first_font_enum, (LPARAM)&fc);
         if (fc.done) return;




More information about the wine-cvs mailing list