reactos/lib/gdi32/objects
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
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
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
}