Author: jimtabor
Date: Fri Apr 27 09:42:25 2007
New Revision: 26530
URL:
http://svn.reactos.org/svn/reactos?rev=26530&view=rev
Log:
Win32/Gdi32:
- Implement NtGdiHfontCreate, removed NtGdiCreateFont and NtGdiCreateFontIndirect from
service. Changed name to NtGdiGetOutlineTextMetricsInternalW.
- Updated TEXTOBJ structure changing LOGFONTW to ENUMLOGFONTEXDVW.
- Update FontGetObject plus the rest of text.c in win32k.
- Added CreateFontIndirectExA/W to psdk/wingdi.h, it was missing.
Tested with Qemu.
Modified:
trunk/reactos/dll/win32/gdi32/misc/stubsa.c
trunk/reactos/dll/win32/gdi32/misc/stubsw.c
trunk/reactos/dll/win32/gdi32/objects/font.c
trunk/reactos/dll/win32/gdi32/objects/utils.c
trunk/reactos/include/psdk/wingdi.h
trunk/reactos/subsystems/win32/win32k/include/text.h
trunk/reactos/subsystems/win32/win32k/objects/text.c
trunk/reactos/tools/nci/w32ksvc.db
Modified: trunk/reactos/dll/win32/gdi32/misc/stubsa.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/misc/stubs…
==============================================================================
--- trunk/reactos/dll/win32/gdi32/misc/stubsa.c (original)
+++ trunk/reactos/dll/win32/gdi32/misc/stubsa.c Fri Apr 27 09:42:25 2007
@@ -277,9 +277,20 @@
STDCALL
CreateFontIndirectExA(const ENUMLOGFONTEXDVA *elfexd)
{
- UNIMPLEMENTED;
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return 0;
+ if (elfexd)
+ {
+ ENUMLOGFONTEXDVW Logfont;
+
+ EnumLogFontExW2A( (LPENUMLOGFONTEXA) elfexd,
+ &Logfont.elfEnumLogfontEx );
+
+ RtlCopyMemory( &Logfont.elfDesignVector,
+ (PVOID) &elfexd->elfDesignVector,
+ sizeof(DESIGNVECTOR));
+
+ return NtGdiHfontCreate( &Logfont, 0, 0, 0, NULL);
+ }
+ else return NULL;
}
/*
Modified: trunk/reactos/dll/win32/gdi32/misc/stubsw.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/misc/stubs…
==============================================================================
--- trunk/reactos/dll/win32/gdi32/misc/stubsw.c (original)
+++ trunk/reactos/dll/win32/gdi32/misc/stubsw.c Fri Apr 27 09:42:25 2007
@@ -353,9 +353,11 @@
STDCALL
CreateFontIndirectExW(const ENUMLOGFONTEXDVW *elfexd)
{
- UNIMPLEMENTED;
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return 0;
+ if ( elfexd )
+ {
+ return NtGdiHfontCreate((PENUMLOGFONTEXDVW) elfexd, 0, 0, 0, NULL );
+ }
+ else return NULL;
}
/*
Modified: trunk/reactos/dll/win32/gdi32/objects/font.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/objects/fo…
==============================================================================
--- trunk/reactos/dll/win32/gdi32/objects/font.c (original)
+++ trunk/reactos/dll/win32/gdi32/objects/font.c Fri Apr 27 09:42:25 2007
@@ -282,7 +282,7 @@
Info[i].FontType, lParam);
}
else
- {
+ { // Could use EnumLogFontExW2A here?
LogFontW2A(&EnumLogFontExA.elfLogFont,
&Info[i].EnumLogFontEx.elfLogFont);
WideCharToMultiByte(CP_THREAD_ACP, 0, Info[i].EnumLogFontEx.elfFullName, -1,
(LPSTR)EnumLogFontExA.elfFullName, LF_FULLFACESIZE, NULL,
NULL);
@@ -814,10 +814,9 @@
LPOUTLINETEXTMETRICW lpOTM
)
{
- return NtGdiGetOutlineTextMetrics(hdc, cbData, lpOTM);
-// TMDIFF Tmd; // Should not be zero.
-// if ( lpOTM == NULL) return 0;
-// return NtGdiGetOutlineTextMetricsInternalW(hdc, cbData, lpOTM, &Tmd);
+ TMDIFF Tmd; // Should not be zero.
+
+ return NtGdiGetOutlineTextMetricsInternalW(hdc, cbData, lpOTM, &Tmd);
}
@@ -830,14 +829,14 @@
CONST LOGFONTA *lplf
)
{
- LOGFONTW tlf;
-
if (lplf)
{
+ LOGFONTW tlf;
+
LogFontA2W(&tlf, lplf);
- return NtGdiCreateFontIndirect(&tlf);
- }
- else return NtGdiCreateFontIndirect(NULL);
+ return CreateFontIndirectW(&tlf);
+ }
+ else return NULL;
}
@@ -850,7 +849,25 @@
CONST LOGFONTW *lplf
)
{
- return NtGdiCreateFontIndirect((CONST LPLOGFONTW)lplf);
+ if (lplf)
+ {
+ ENUMLOGFONTEXDVW Logfont;
+
+ RtlCopyMemory( &Logfont.elfEnumLogfontEx.elfLogFont, lplf, sizeof(LOGFONTW));
+ // Need something other than just cleaning memory here.
+ // Guess? Use caller data to determine the rest.
+ RtlZeroMemory( &Logfont.elfEnumLogfontEx.elfFullName,
+ sizeof(Logfont.elfEnumLogfontEx.elfFullName));
+ RtlZeroMemory( &Logfont.elfEnumLogfontEx.elfStyle,
+ sizeof(Logfont.elfEnumLogfontEx.elfStyle));
+ RtlZeroMemory( &Logfont.elfEnumLogfontEx.elfScript,
+ sizeof(Logfont.elfEnumLogfontEx.elfScript));
+
+ RtlZeroMemory( &Logfont.elfDesignVector, sizeof(DESIGNVECTOR));
+
+ return CreateFontIndirectExW(&Logfont);
+ }
+ else return NULL;
}
@@ -883,8 +900,20 @@
RtlInitAnsiString(&StringA, (LPSTR)lpszFace);
RtlAnsiStringToUnicodeString(&StringU, &StringA, TRUE);
- ret = CreateFontW(nHeight, nWidth, nEscapement, nOrientation, fnWeight,
fdwItalic, fdwUnderline, fdwStrikeOut,
- fdwCharSet, fdwOutputPrecision, fdwClipPrecision, fdwQuality,
fdwPitchAndFamily, StringU.Buffer);
+ ret = CreateFontW(nHeight,
+ nWidth,
+ nEscapement,
+ nOrientation,
+ fnWeight,
+ fdwItalic,
+ fdwUnderline,
+ fdwStrikeOut,
+ fdwCharSet,
+ fdwOutputPrecision,
+ fdwClipPrecision,
+ fdwQuality,
+ fdwPitchAndFamily,
+ StringU.Buffer);
RtlFreeUnicodeString(&StringU);
@@ -914,8 +943,35 @@
LPCWSTR lpszFace
)
{
- return NtGdiCreateFont(nHeight, nWidth, nEscapement, nOrientation, nWeight, fnItalic,
fdwUnderline, fdwStrikeOut,
- fdwCharSet, fdwOutputPrecision, fdwClipPrecision, fdwQuality,
fdwPitchAndFamily, lpszFace);
+ LOGFONTW logfont;
+
+ logfont.lfHeight = nHeight;
+ logfont.lfWidth = nWidth;
+ logfont.lfEscapement = nEscapement;
+ logfont.lfOrientation = nOrientation;
+ logfont.lfWeight = nWeight;
+ logfont.lfItalic = fnItalic;
+ logfont.lfUnderline = fdwUnderline;
+ logfont.lfStrikeOut = fdwStrikeOut;
+ logfont.lfCharSet = fdwCharSet;
+ logfont.lfOutPrecision = fdwOutputPrecision;
+ logfont.lfClipPrecision = fdwClipPrecision;
+ logfont.lfQuality = fdwQuality;
+ logfont.lfPitchAndFamily = fdwPitchAndFamily;
+
+ if (NULL != lpszFace)
+ {
+ int Size = sizeof(logfont.lfFaceName) / sizeof(WCHAR);
+ wcsncpy((wchar_t *)logfont.lfFaceName, lpszFace, Size - 1);
+ /* Be 101% sure to have '\0' at end of string */
+ logfont.lfFaceName[Size - 1] = '\0';
+ }
+ else
+ {
+ logfont.lfFaceName[0] = L'\0';
+ }
+
+ return CreateFontIndirectW(&logfont);
}
Modified: trunk/reactos/dll/win32/gdi32/objects/utils.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/objects/ut…
==============================================================================
--- trunk/reactos/dll/win32/gdi32/objects/utils.c (original)
+++ trunk/reactos/dll/win32/gdi32/objects/utils.c Fri Apr 27 09:42:25 2007
@@ -390,13 +390,13 @@
{
LogFontW2A( (LPLOGFONTA)fontA, (CONST LOGFONTW *)fontW );
- WideCharToMultiByte( CP_ACP, 0, fontW->elfFullName, -1,
+ WideCharToMultiByte( CP_THREAD_ACP, 0, fontW->elfFullName, -1,
(LPSTR) fontA->elfFullName, LF_FULLFACESIZE, NULL, NULL );
fontA->elfFullName[LF_FULLFACESIZE-1] = '\0';
- WideCharToMultiByte( CP_ACP, 0, fontW->elfStyle, -1,
+ WideCharToMultiByte( CP_THREAD_ACP, 0, fontW->elfStyle, -1,
(LPSTR) fontA->elfStyle, LF_FACESIZE, NULL, NULL );
fontA->elfStyle[LF_FACESIZE-1] = '\0';
- WideCharToMultiByte( CP_ACP, 0, fontW->elfScript, -1,
+ WideCharToMultiByte( CP_THREAD_ACP, 0, fontW->elfScript, -1,
(LPSTR) fontA->elfScript, LF_FACESIZE, NULL, NULL );
fontA->elfScript[LF_FACESIZE-1] = '\0';
}
Modified: trunk/reactos/include/psdk/wingdi.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/wingdi.h?rev=…
==============================================================================
--- trunk/reactos/include/psdk/wingdi.h (original)
+++ trunk/reactos/include/psdk/wingdi.h Fri Apr 27 09:42:25 2007
@@ -2651,6 +2651,8 @@
HFONT WINAPI
CreateFontW(int,int,int,int,int,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,LPCWSTR);
HFONT WINAPI CreateFontIndirectA(const LOGFONTA*);
HFONT WINAPI CreateFontIndirectW(const LOGFONTW*);
+HFONT WINAPI CreateFontIndirectExA(const ENUMLOGFONTEXDVA *);
+HFONT WINAPI CreateFontIndirectExW(const ENUMLOGFONTEXDVW *);
HPALETTE WINAPI CreateHalftonePalette(HDC);
HBRUSH WINAPI CreateHatchBrush(int,COLORREF);
HDC WINAPI CreateICA(LPCSTR,LPCSTR,LPCSTR,const DEVMODEA*);
@@ -2997,6 +2999,7 @@
#define CreateEnhMetaFile CreateEnhMetaFileW
#define CreateFont CreateFontW
#define CreateFontIndirect CreateFontIndirectW
+#define CreateFontIndirectEx CreateFontIndirectExW
#define CreateIC CreateICW
#define CreateMetaFile CreateMetaFileW
#define CreateScalableFontResource CreateScalableFontResourceW
@@ -3069,6 +3072,7 @@
#define CreateEnhMetaFile CreateEnhMetaFileA
#define CreateFont CreateFontA
#define CreateFontIndirect CreateFontIndirectA
+#define CreateFontIndirectEx CreateFontIndirectExA
#define CreateIC CreateICA
#define CreateMetaFile CreateMetaFileA
#define CreateScalableFontResource CreateScalableFontResourceA
Modified: trunk/reactos/subsystems/win32/win32k/include/text.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/text.h (original)
+++ trunk/reactos/subsystems/win32/win32k/include/text.h Fri Apr 27 09:42:25 2007
@@ -4,7 +4,7 @@
/* GDI logical font object */
typedef struct
{
- LOGFONTW logfont;
+ ENUMLOGFONTEXDVW logfont; //LOGFONTW logfont;
FONTOBJ *Font;
BOOLEAN Initialized; /* Don't reinitialize for each DC */
} TEXTOBJ, *PTEXTOBJ;
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 Fri Apr 27 09:42:25 2007
@@ -499,11 +499,12 @@
TextObj = TEXTOBJ_LockText(*NewFont);
if (NULL != TextObj)
{
- memcpy(&TextObj->logfont, lf, sizeof(LOGFONTW));
+ memcpy(&TextObj->logfont.elfEnumLogfontEx.elfLogFont, lf,
sizeof(LOGFONTW));
if (lf->lfEscapement != lf->lfOrientation)
{
/* this should really depend on whether GM_ADVANCED is set */
- TextObj->logfont.lfOrientation = TextObj->logfont.lfEscapement;
+ TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfOrientation =
+ TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfEscapement;
}
TEXTOBJ_UnlockText(TextObj);
}
@@ -600,6 +601,65 @@
return NT_SUCCESS(Status) ? NewFont : NULL;
}
+
+
+HFONT
+STDCALL
+NtGdiHfontCreate(
+ IN PENUMLOGFONTEXDVW pelfw,
+ IN ULONG cjElfw,
+ IN LFTYPE lft,
+ IN FLONG fl,
+ IN PVOID pvCliData )
+{
+ ENUMLOGFONTEXDVW SafeLogfont;
+ HFONT NewFont;
+ PTEXTOBJ TextObj;
+ NTSTATUS Status = STATUS_SUCCESS;
+
+ if (NULL != pelfw)
+ {
+ Status = MmCopyFromCaller(&SafeLogfont, pelfw, sizeof(ENUMLOGFONTEXDVW));
+ if (NT_SUCCESS(Status))
+ {
+ NewFont = TEXTOBJ_AllocText();
+ if (NULL != NewFont)
+ {
+ TextObj = TEXTOBJ_LockText(NewFont);
+
+ if (NULL != TextObj)
+ {
+ RtlCopyMemory ( &TextObj->logfont,
+ &SafeLogfont,
+ sizeof(ENUMLOGFONTEXDVW));
+
+ if (SafeLogfont.elfEnumLogfontEx.elfLogFont.lfEscapement !=
+ SafeLogfont.elfEnumLogfontEx.elfLogFont.lfOrientation)
+ {
+ /* this should really depend on whether GM_ADVANCED is set */
+ TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfOrientation =
+ TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfEscapement;
+ }
+ TEXTOBJ_UnlockText(TextObj);
+ }
+ else
+ {
+/* FIXME */
+/* ASSERT(FALSE);*/
+ Status = STATUS_INVALID_HANDLE;
+ }
+ }
+ }
+ }
+ else
+ {
+ Status = STATUS_INVALID_PARAMETER;
+ }
+
+ return NT_SUCCESS(Status) ? NewFont : NULL;
+
+}
+
BOOL
STDCALL
@@ -1824,17 +1884,17 @@
Render = IntIsFontRenderingEnabled();
if (Render)
- RenderMode = IntGetFontRenderMode(&TextObj->logfont);
+ RenderMode =
IntGetFontRenderMode(&TextObj->logfont.elfEnumLogfontEx.elfLogFont);
else
RenderMode = FT_RENDER_MODE_MONO;
error = FT_Set_Pixel_Sizes(
face,
- TextObj->logfont.lfWidth,
+ TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfWidth,
/* FIXME should set character height if neg */
- (TextObj->logfont.lfHeight < 0 ?
- - TextObj->logfont.lfHeight :
- TextObj->logfont.lfHeight == 0 ? 11 : TextObj->logfont.lfHeight));
+ (TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight < 0 ?
+ - TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight :
+ TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight == 0 ? 11 :
TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight));
if (error)
{
DPRINT1("Error in setting pixel sizes: %u\n", error);
@@ -1884,7 +1944,8 @@
for (i = Start; i < Count; i++)
{
glyph_index = FT_Get_Char_Index(face, *TempText);
- if (!(realglyph = NtGdiGlyphCacheGet(face, glyph_index,
TextObj->logfont.lfHeight)))
+ if (!(realglyph = NtGdiGlyphCacheGet(face, glyph_index,
+ TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight)))
{
error = FT_Load_Glyph(face, glyph_index, FT_LOAD_DEFAULT);
if (error)
@@ -1893,7 +1954,8 @@
}
glyph = face->glyph;
- realglyph = NtGdiGlyphCacheSet(face, glyph_index,
TextObj->logfont.lfHeight, glyph, RenderMode);
+ realglyph = NtGdiGlyphCacheSet(face, glyph_index,
+ TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight, glyph,
RenderMode);
}
/* retrieve kerning distance */
if (use_kerning && previous && glyph_index)
@@ -1932,7 +1994,8 @@
for (i = 0; i < Count; i++)
{
glyph_index = FT_Get_Char_Index(face, *String);
- if (!(realglyph = NtGdiGlyphCacheGet(face, glyph_index,
TextObj->logfont.lfHeight)))
+ if (!(realglyph = NtGdiGlyphCacheGet(face, glyph_index,
+ TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight)))
{
error = FT_Load_Glyph(face, glyph_index, FT_LOAD_DEFAULT);
@@ -1943,7 +2006,8 @@
goto fail;
}
glyph = face->glyph;
- realglyph = NtGdiGlyphCacheSet(face, glyph_index, TextObj->logfont.lfHeight,
glyph, RenderMode);
+ realglyph = NtGdiGlyphCacheSet(face, glyph_index,
+ TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight, glyph, RenderMode);
}
// DbgPrint("realglyph: %x\n", realglyph);
// DbgPrint("TextLeft: %d\n", TextLeft);
@@ -2238,10 +2302,10 @@
IntLockFreeType;
FT_Set_Pixel_Sizes(face,
- TextObj->logfont.lfWidth,
+ TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfWidth,
/* FIXME should set character height if neg */
- (TextObj->logfont.lfHeight < 0 ? -
TextObj->logfont.lfHeight :
- TextObj->logfont.lfHeight == 0 ? 11 :
TextObj->logfont.lfHeight));
+ (TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight < 0 ?
- TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight :
+ TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight == 0 ? 11
: TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight));
for (i = FirstChar; i <= LastChar; i++)
{
@@ -2382,11 +2446,11 @@
IntLockFreeType;
FT_Set_Pixel_Sizes(face,
- TextObj->logfont.lfWidth,
+ TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfWidth,
/* FIXME should set character height if neg */
- (TextObj->logfont.lfHeight < 0 ?
- - TextObj->logfont.lfHeight :
- TextObj->logfont.lfHeight == 0 ? 11 :
TextObj->logfont.lfHeight));
+ (TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight < 0 ?
+ - TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight :
+ TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight == 0 ? 11
: TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight));
for (i = FirstChar; i <= LastChar; i++)
{
@@ -2516,8 +2580,8 @@
FontGDI = ObjToGDI(TextObj->Font, FONT);
ft_face = FontGDI->face;
- aveWidth = FT_IS_SCALABLE(ft_face) ? TextObj->logfont.lfWidth: 0;
- orientation = FT_IS_SCALABLE(ft_face) ? TextObj->logfont.lfOrientation: 0;
+ aveWidth = FT_IS_SCALABLE(ft_face) ?
TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfWidth: 0;
+ orientation = FT_IS_SCALABLE(ft_face) ?
TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfOrientation: 0;
Size = IntGetOutlineTextMetrics(FontGDI, 0, NULL);
potm = ExAllocatePoolWithTag(PagedPool, Size, TAG_GDITEXT);
@@ -2561,10 +2625,10 @@
}
// FT_Set_Pixel_Sizes(ft_face,
-// TextObj->logfont.lfWidth,
+// TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfWidth,
/* FIXME should set character height if neg */
-// (TextObj->logfont.lfHeight < 0 ? -
TextObj->logfont.lfHeight :
-// TextObj->logfont.lfHeight == 0 ? 11 :
TextObj->logfont.lfHeight));
+// (TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight < 0 ?
- TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight :
+// TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight == 0 ?
11 : TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight));
TEXTOBJ_UnlockText(TextObj);
@@ -3107,11 +3171,12 @@
From "Undocumented Windows 2000 Secrets" Appendix B, Table B-2, page
472, this is NtGdiGetOutlineTextMetricsInternalW.
*/
-UINT
+ULONG
STDCALL
-NtGdiGetOutlineTextMetrics(HDC hDC,
- UINT Data,
- LPOUTLINETEXTMETRICW otm)
+NtGdiGetOutlineTextMetricsInternalW (HDC hDC,
+ ULONG Data,
+ OUTLINETEXTMETRICW *otm,
+ TMDIFF *Tmd)
{
PDC dc;
PTEXTOBJ TextObj;
@@ -3343,11 +3408,11 @@
IntLockFreeType;
error = FT_Set_Pixel_Sizes(face,
- TextObj->logfont.lfWidth,
+ TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfWidth,
/* FIXME should set character height if neg */
- (TextObj->logfont.lfHeight < 0 ?
- - TextObj->logfont.lfHeight :
- TextObj->logfont.lfHeight == 0 ? 11 :
TextObj->logfont.lfHeight));
+ (TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight
< 0 ?
+ - TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight
:
+ TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight ==
0 ? 11 : TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight));
IntUnLockFreeType;
if (error)
{
@@ -3395,7 +3460,7 @@
}
Size->cx = (TotalWidth + 32) >> 6;
- Size->cy = (TextObj->logfont.lfHeight < 0 ? - TextObj->logfont.lfHeight :
TextObj->logfont.lfHeight);
+ Size->cy = (TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight < 0 ? -
TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight :
TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight);
Size->cy = EngMulDiv(Size->cy, IntGdiGetDeviceCaps(dc, LOGPIXELSY), 72);
return TRUE;
@@ -3657,8 +3722,8 @@
TextObj = TEXTOBJ_LockText(hFont);
ASSERT(TextObj != NULL);
- Count = min(Count, wcslen(TextObj->logfont.lfFaceName));
- Status = MmCopyToCaller(FaceName, TextObj->logfont.lfFaceName, Count *
sizeof(WCHAR));
+ Count = min(Count,
wcslen(TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfFaceName));
+ Status = MmCopyToCaller(FaceName,
TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfFaceName, Count * sizeof(WCHAR));
TEXTOBJ_UnlockText(TextObj);
if (!NT_SUCCESS(Status))
{
@@ -3704,11 +3769,11 @@
Face = FontGDI->face;
IntLockFreeType;
Error = FT_Set_Pixel_Sizes(Face,
- TextObj->logfont.lfWidth,
+ TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfWidth,
/* FIXME should set character height if neg */
- (TextObj->logfont.lfHeight < 0 ?
- - TextObj->logfont.lfHeight :
- TextObj->logfont.lfHeight == 0 ? 11 :
TextObj->logfont.lfHeight));
+
(TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight < 0 ?
+ -
TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight :
+
TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight == 0 ? 11 :
TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight));
IntUnLockFreeType;
if (0 != Error)
{
@@ -4059,7 +4124,7 @@
return STATUS_SUCCESS;
}
- if (! RtlCreateUnicodeString(&FaceName, TextObj->logfont.lfFaceName))
+ if (! RtlCreateUnicodeString(&FaceName,
TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfFaceName))
{
TEXTOBJ_UnlockText(TextObj);
return STATUS_NO_MEMORY;
@@ -4072,21 +4137,21 @@
Win32Process = PsGetCurrentProcessWin32Process();
IntLockProcessPrivateFonts(Win32Process);
FindBestFontFromList(&TextObj->Font, &MatchScore,
- &TextObj->logfont, &FaceName,
+ &TextObj->logfont.elfEnumLogfontEx.elfLogFont,
&FaceName,
&Win32Process->PrivateFontListHead);
IntUnLockProcessPrivateFonts(Win32Process);
/* Search system fonts */
IntLockGlobalFonts;
FindBestFontFromList(&TextObj->Font, &MatchScore,
- &TextObj->logfont, &FaceName,
+ &TextObj->logfont.elfEnumLogfontEx.elfLogFont,
&FaceName,
&FontListHead);
IntUnLockGlobalFonts;
if (NULL == TextObj->Font)
{
DPRINT1("Requested font %S not found, no fonts loaded at all\n",
- TextObj->logfont.lfFaceName);
+ TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfFaceName);
Status = STATUS_NOT_FOUND;
}
else
@@ -4104,36 +4169,35 @@
}
INT FASTCALL
-FontGetObject(PTEXTOBJ Font, INT Count, PVOID Buffer)
+FontGetObject(PTEXTOBJ TFont, INT Count, PVOID Buffer)
{
if( Buffer == NULL ) 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));
+ RtlCopyMemory( (LPENUMLOGFONTEXDVW) Buffer,
+ &TFont->logfont,
+ sizeof(ENUMLOGFONTEXDVW));
+ break;
case sizeof(ENUMLOGFONTEXW):
RtlCopyMemory( (LPENUMLOGFONTEXW) Buffer,
- &Font->logFont.elfEnumLogfontEx,
+ &TFont->logfont.elfEnumLogfontEx,
sizeof(ENUMLOGFONTEXW));
break;
case sizeof(EXTLOGFONTW):
case sizeof(ENUMLOGFONTW):
RtlCopyMemory((LPENUMLOGFONTW) Buffer,
- (LPENUMLOGFONTW)
&Font->logfont.elfEnumLogfontEx.elfLogFont,
+ &TFont->logfont.elfEnumLogfontEx.elfLogFont,
sizeof(ENUMLOGFONTW));
break;
-*/
+
case sizeof(LOGFONTW):
-/* RtlCopyMemory((LPLOGFONTW) Buffer,
-
&Font->logFont.elfEnumLogfontEx.elfLogFont,
- sizeof(LOGFONTW));
-*/
- RtlCopyMemory(Buffer, &Font->logfont, sizeof(LOGFONTW));
+ RtlCopyMemory((LPLOGFONTW) Buffer,
+ &TFont->logfont.elfEnumLogfontEx.elfLogFont,
+ sizeof(LOGFONTW));
break;
default:
Modified: trunk/reactos/tools/nci/w32ksvc.db
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/nci/w32ksvc.db?rev=2…
==============================================================================
--- trunk/reactos/tools/nci/w32ksvc.db (original)
+++ trunk/reactos/tools/nci/w32ksvc.db Fri Apr 27 09:42:25 2007
@@ -33,8 +33,6 @@
NtGdiCreateEllipticRgn 4
NtGdiCreateEllipticRgnIndirect 1
NtGdiCreateEnhMetaFile 4
-NtGdiCreateFont 14
-NtGdiCreateFontIndirect 1
NtGdiCreateHalftonePalette 1
NtGdiCreateHatchBrushInternal 3
NtGdiCreateIC 4
@@ -138,7 +136,7 @@
NtGdiGetMiterLimit 2
NtGdiGetNearestColor 2
NtGdiGetNearestPaletteIndex 2
-NtGdiGetOutlineTextMetrics 3
+NtGdiGetOutlineTextMetricsInternalW 4
NtGdiGetPaletteEntries 4
NtGdiGetPath 4
NtGdiGetPixel 3
@@ -171,6 +169,7 @@
NtGdiGetWindowOrgEx 2
NtGdiGetWorldTransform 2
NtGdiGradientFill 6
+NtGdiHfontCreate 5
NtGdiIntersectClipRect 5
NtGdiInvertRgn 2
NtGdiLPtoDP 3