fontdlg: enable TT bitmap

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hi,

This piece of code has been #if 0'd out since the start of cvs. I fail
to see why actually, even if it not quite complete, it appears to work
and it looks better.

Changelog:
	dlls/commdlg	: fontdlg.c
	Enable the display of a true type bitmap for true type fonts.

Rein.
-- 
Rein Klazes
rklazes@xxxxxxxxx
--- wine/dlls/commdlg/fontdlg.c	2003-12-05 07:34:05.000000000 +0100
+++ mywine/dlls/commdlg/fontdlg.c	2003-12-07 11:08:03.000000000 +0100
@@ -810,11 +810,9 @@
     BITMAP bm;
     COLORREF cr, oldText=0, oldBk=0;
     RECT rect;
-#if 0
     HDC hMemDC;
     int nFontType;
-    HBITMAP hBitmap; /* for later TT usage */
-#endif
+    HBITMAP objPrev; /* for TT usage */
     LPDRAWITEMSTRUCT lpdi = (LPDRAWITEMSTRUCT)lParam;
 
     if (lpdi->itemID == (UINT)-1)  /* got no items */
@@ -848,19 +846,16 @@
             GetObjectA( hBitmapTT, sizeof(bm), &bm );
             TextOutA(lpdi->hDC, lpdi->rcItem.left + bm.bmWidth + 10,
                      lpdi->rcItem.top, buffer, strlen(buffer));
-#if 0
             nFontType = SendMessageA(lpdi->hwndItem, CB_GETITEMDATA, lpdi->itemID,0L);
-            /* FIXME: draw bitmap if truetype usage */
-            if (nFontType&TRUETYPE_FONTTYPE)
+            if (nFontType & TRUETYPE_FONTTYPE)
             {
                 hMemDC = CreateCompatibleDC(lpdi->hDC);
-                hBitmap = SelectObject(hMemDC, hBitmapTT);
+                objPrev = SelectObject(hMemDC, hBitmapTT);
                 BitBlt(lpdi->hDC, lpdi->rcItem.left, lpdi->rcItem.top,
                        bm.bmWidth, bm.bmHeight, hMemDC, 0, 0, SRCCOPY);
-                SelectObject(hMemDC, hBitmap);
+                SelectObject(hMemDC, objPrev);
                 DeleteDC(hMemDC);
             }
-#endif
             break;
         case cmb2:
         case cmb3:

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux