[CONSOLE.CPL] Fix the console screen preview when selecting TrueType fonts.
[reactos.git] / dll / cpl / console / layout.c
index 9123a1f..f8d9986 100644 (file)
@@ -205,8 +205,8 @@ WinPrev_OnDraw(
 
     /* We start with the console client area, rescaled for the preview */
     SetRect(&rcWin, 0, 0,
-            pConInfo->WindowSize.X * pConInfo->FontSize.X,
-            pConInfo->WindowSize.Y * pConInfo->FontSize.Y);
+            pConInfo->WindowSize.X * FontPreview.CharWidth,
+            pConInfo->WindowSize.Y * FontPreview.CharHeight);
     RescaleRect(pData, rcWin);
 
     /* Add the scrollbars if needed (does not account for any frame) */
@@ -489,7 +489,7 @@ PaintText(
     hBrush = CreateSolidBrush(nbkColor);
     if (!hBrush) return;
 
-    hOldFont = SelectObject(drawItem->hDC, hCurrentFont);
+    hOldFont = SelectObject(drawItem->hDC, FontPreview.hFont);
     //if (hOldFont == NULL)
     //{
     //    DeleteObject(hBrush);