Author: jimtabor
Date: Thu Apr 26 08:34:46 2007
New Revision: 26511
URL:
http://svn.reactos.org/svn/reactos?rev=26511&view=rev
Log:
Update FontGetObject, point out required modifications to support ENUMLOGFONTEXDVW for
font objects.
Modified:
trunk/reactos/subsystems/win32/win32k/objects/text.c
Modified: trunk/reactos/subsystems/win32/win32k/objects/text.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/text.c (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/text.c Thu Apr 26 08:34:46 2007
@@ -4108,12 +4108,39 @@
{
if( Buffer == NULL ) return sizeof(LOGFONTW);
- /* fixme SetLastWin32Error(ERROR_BUFFER_OVERFLOW); in count<0*/
- if (Count < sizeof(LOGFONTW)) return 0;
- if (Count > sizeof(LOGFONTW)) Count = sizeof(LOGFONTW);
-
- RtlCopyMemory(Buffer, &Font->logfont, sizeof(LOGFONTW));
- return sizeof(LOGFONTW);
+ switch (Count)
+ {
+/* Everything will need to be converted over to ENUMLOGFONTEXDVW.
+ case sizeof(ENUMLOGFONTEXDVW):
+ RtlCopyMemory( (LPENUMLOGFONTEXDVW) Buffer.elfDesignVector,
+ &Font->logFont.elfDesignVector,
+ sizeof(DESIGNVECTOR));
+ case sizeof(ENUMLOGFONTEXW):
+ RtlCopyMemory( (LPENUMLOGFONTEXW) Buffer,
+ &Font->logFont.elfEnumLogfontEx,
+ sizeof(ENUMLOGFONTEXW));
+ break;
+
+ case sizeof(EXTLOGFONTW):
+ case sizeof(ENUMLOGFONTW):
+ RtlCopyMemory((LPENUMLOGFONTW) Buffer,
+ (LPENUMLOGFONTW)
&Font->logfont.elfEnumLogfontEx.elfLogFont,
+ sizeof(ENUMLOGFONTW));
+ break;
+*/
+ case sizeof(LOGFONTW):
+/* RtlCopyMemory((LPLOGFONTW) Buffer,
+
&Font->logFont.elfEnumLogfontEx.elfLogFont,
+ sizeof(LOGFONTW));
+*/
+ RtlCopyMemory(Buffer, &Font->logfont, sizeof(LOGFONTW));
+ break;
+
+ default:
+ SetLastWin32Error(ERROR_BUFFER_OVERFLOW);
+ return 0;
+ }
+ return Count;
}