|
From: Jeffrey D. <ha...@us...> - 2003-09-17 23:09:14
|
Log Message:
-----------
Disable AA/ClearType on Font Cache drawing (otherwise transparent views look really damn ugly)
Modified Files:
--------------
/cvsroot/decaldev/source/Inject:
FontCache.cpp
FontCache.h
Revision Data
-------------
Index: FontCache.cpp
===================================================================
RCS file: /cvsroot/decaldev/source/Inject/FontCache.cpp,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- FontCache.cpp 18 Aug 2001 19:34:51 -0000 1.1.1.1
+++ FontCache.cpp 17 Sep 2003 23:08:54 -0000 1.2
@@ -116,7 +116,13 @@
for( INT *i_delta = pDeltas; i_delta != i_end_deltas; ++ i_delta, ++ i_src )
*i_delta = m_nWidths[ *i_src ].m_nWidth;
+ if( m_bFontSmoothing )
+ SystemParametersInfo( SPI_SETFONTSMOOTHING, FALSE, NULL, 0 );
+
::ExtTextOut( hdc, ppt->x, ppt->y, 0, NULL, szAnsi, cbLength, pDeltas );
+
+ if( m_bFontSmoothing )
+ SystemParametersInfo( SPI_SETFONTSMOOTHING, TRUE, NULL, 0 );
delete[] pDeltas;
Index: FontCache.h
===================================================================
RCS file: /cvsroot/decaldev/source/Inject/FontCache.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- FontCache.h 18 Aug 2001 19:34:51 -0000 1.1.1.1
+++ FontCache.h 17 Sep 2003 23:08:54 -0000 1.2
@@ -14,6 +14,8 @@
public:
cFontCache()
{
+ m_bFontSmoothing = FALSE;
+ SystemParametersInfo( SPI_GETFONTSMOOTHING, 0, &m_bFontSmoothing, 0 );
}
~cFontCache();
@@ -23,6 +25,7 @@
short m_nWidth;
};
+ BOOL m_bFontSmoothing;
SIZE m_szCharCell;
cCharMetrics m_nWidths[ 256 ];
LOGFONT m_lf;
|