Commit in reactos on MAIN
lib/gdi32/objects/text.c+4-131.17 -> 1.18
lib/rosrtl/misc/logfont.c+2-21.1 -> 1.2
include/rosrtl/logfont.h+2-21.1 -> 1.2
+8-17
3 modified files
Fix LOGFONT conversion in CreateFontIndirectA()

reactos/lib/gdi32/objects
text.c 1.17 -> 1.18
diff -u -r1.17 -r1.18
--- text.c	23 Mar 2004 00:18:54 -0000	1.17
+++ text.c	27 Mar 2004 21:07:33 -0000	1.18
@@ -8,6 +8,7 @@
 #include <ddk/ntddk.h>
 #include <win32k/kapi.h>
 #include <internal/font.h>
+#include <rosrtl/logfont.h>
 
 
 /*
@@ -260,21 +261,11 @@
 	CONST LOGFONTA		*lf
 	)
 {
-        ANSI_STRING StringA;
-        UNICODE_STRING StringU;
-	HFONT ret;
-        LOGFONTW tlf;
-
-	RtlInitAnsiString(&StringA, (LPSTR)lf->lfFaceName);
-	RtlAnsiStringToUnicodeString(&StringU, &StringA, TRUE);
-        memcpy(&tlf, lf, sizeof(LOGFONTA));
-        memcpy(&tlf.lfFaceName, &StringU.Buffer, StringU.Length);
-
-        ret = CreateFontIndirectW(&tlf);
+  LOGFONTW tlf;
 
-	RtlFreeUnicodeString(&StringU);
+  RosRtlLogFontA2W(&tlf, lf);
 
-	return ret;
+  return NtGdiCreateFontIndirect(&tlf);
 }
 
 

reactos/lib/rosrtl/misc
logfont.c 1.1 -> 1.2
diff -u -r1.1 -r1.2
--- logfont.c	21 Jul 2003 04:56:32 -0000	1.1
+++ logfont.c	27 Mar 2004 21:07:33 -0000	1.2
@@ -3,7 +3,7 @@
 #include <rosrtl/logfont.h>
 
 void
-RosRtlLogFontA2W ( LPLOGFONTW pW, const LPLOGFONTA pA )
+RosRtlLogFontA2W ( LPLOGFONTW pW, const LOGFONTA *pA )
 {
 #define COPYS(f,len) MultiByteToWideChar ( CP_THREAD_ACP, 0, pA->f, len, pW->f, len )
 #define COPYN(f) pW->f = pA->f
@@ -28,7 +28,7 @@
 }
 
 void
-RosRtlLogFontW2A ( LPLOGFONTA pA, const LPLOGFONTW pW )
+RosRtlLogFontW2A ( LPLOGFONTA pA, const LOGFONTW *pW )
 {
 #define COPYS(f,len) WideCharToMultiByte ( CP_THREAD_ACP, 0, pW->f, len, pA->f, len, NULL, NULL )
 #define COPYN(f) pA->f = pW->f

reactos/include/rosrtl
logfont.h 1.1 -> 1.2
diff -u -r1.1 -r1.2
--- logfont.h	21 Jul 2003 04:56:32 -0000	1.1
+++ logfont.h	27 Mar 2004 21:07:33 -0000	1.2
@@ -7,10 +7,10 @@
 #endif
 
 void
-RosRtlLogFontA2W ( LPLOGFONTW pW, const LPLOGFONTA pA );
+RosRtlLogFontA2W ( LPLOGFONTW pW, const LOGFONTA *pA );
 
 void
-RosRtlLogFontW2A ( LPLOGFONTA pA, const LPLOGFONTW pW );
+RosRtlLogFontW2A ( LPLOGFONTA pA, const LOGFONTW *pW );
 
 #ifdef __cplusplus
 }
CVSspam 0.2.8