FT_Library g_FreeTypeLibrary;
-typedef struct
-{
- FT_Int major;
- FT_Int minor;
- FT_Int patch;
-} FT_Version_t;
-static FT_Version_t FT_Version;
-static DWORD FT_SimpleVersion;
-#define FT_VERSION_VALUE(major, minor, patch) (((major) << 16) | ((minor) << 8) | (patch))
-
/* special font names */
static const UNICODE_STRING g_MarlettW = RTL_CONSTANT_STRING(L"Marlett");
IntUnLockFreeType();
}
+
+static __inline void FTVectorToPOINTFX(FT_Vector *vec, POINTFX *pt)
+{
+ pt->x.value = vec->x >> 6;
+ pt->x.fract = (vec->x & 0x3f) << 10;
+ pt->x.fract |= ((pt->x.fract >> 6) | (pt->x.fract >> 12));
+ pt->y.value = vec->y >> 6;
+ pt->y.fract = (vec->y & 0x3f) << 10;
+ pt->y.fract |= ((pt->y.fract >> 6) | (pt->y.fract >> 12));
+}
+
+/*
+ This function builds an FT_Fixed from a float. It puts the integer part
+ in the highest 16 bits and the decimal part in the lowest 16 bits of the FT_Fixed.
+ It fails if the integer part of the float number is greater than SHORT_MAX.
+*/
+static __inline FT_Fixed FT_FixedFromFloat(FLOAT f)
+{
+ short value = f;
+ unsigned short fract = (f - value) * 0xFFFF;
+ return (FT_Fixed)((long)value << 16 | (unsigned long)fract);
+}
+
+/*
+ This function builds an FT_Fixed from a FIXED. It simply put f.value
+ in the highest 16 bits and f.fract in the lowest 16 bits of the FT_Fixed.
+*/
+static __inline FT_Fixed FT_FixedFromFIXED(FIXED f)
+{
+ return (FT_Fixed)((long)f.value << 16 | (unsigned long)f.fract);
+}
+
+
#if DBG
VOID DumpFontGDI(PFONTGDI FontGDI)
{
return FALSE;
}
- FT_Library_Version(g_FreeTypeLibrary,&FT_Version.major,&FT_Version.minor,&FT_Version.patch);
-
- DPRINT1("FreeType version is %d.%d.%d\n",FT_Version.major,FT_Version.minor,FT_Version.patch);
- FT_SimpleVersion = ((FT_Version.major << 16) & 0xff0000) |
- ((FT_Version.minor << 8) & 0x00ff00) |
- ((FT_Version.patch ) & 0x0000ff);
-
IntLoadSystemFonts();
IntLoadFontSubstList(&g_FontSubstListHead);
VOID FASTCALL IntEscapeMatrix(FT_Matrix *pmat, LONG lfEscapement)
{
- double radian = (lfEscapement * M_PI) / 180 / 10;
-
- pmat->xx = (FT_Fixed)(cos(radian) * (1 << 16));
- pmat->xy = (FT_Fixed)(-sin(radian) * (1 << 16));
+ FT_Vector vecAngle;
+ FT_Angle angle = FT_FixedFromFloat((FLOAT)(lfEscapement * M_PI) / (FLOAT)(180 * 10));
+ FT_Vector_Unit(&vecAngle, angle);
+ pmat->xx = vecAngle.x;
+ pmat->xy = -vecAngle.y;
pmat->yx = -pmat->xy;
pmat->yy = pmat->xx;
}
} while (Entry);
}
-static BOOL is_hinting_enabled(void)
-{
- static int enabled = -1;
-
- if (enabled == -1)
- {
- /* Use the >= 2.2.0 function if available */
- FT_TrueTypeEngineType type = FT_Get_TrueType_Engine_Type(g_FreeTypeLibrary);
- enabled = (type == FT_TRUETYPE_ENGINE_TYPE_PATENTED);
-
- DPRINT1("hinting is %senabled\n", enabled ? "" : "NOT ");
- }
- return enabled;
-}
-
-static BOOL is_subpixel_rendering_enabled( void )
-{
- static int enabled = -1;
- if (enabled == -1)
- {
- /* FreeType >= 2.8.1 offers LCD-optimezed rendering without lcd filters. */
- if (FT_SimpleVersion >= FT_VERSION_VALUE(2, 8, 1))
- enabled = TRUE;
- else enabled = FALSE;
-
- DPRINT1("subpixel rendering is %senabled\n", enabled ? "" : "NOT ");
- }
- return enabled;
-}
-
BOOL FASTCALL
IntIsFontRenderingEnabled(VOID)
{
- return is_hinting_enabled() && is_subpixel_rendering_enabled() && g_RenderingEnabled;
+ return (gpsi->BitsPixel > 8) && g_RenderingEnabled;
}
VOID FASTCALL
return FT_RENDER_MODE_MONO;
case DRAFT_QUALITY:
return FT_RENDER_MODE_LIGHT;
- /* case CLEARTYPE_QUALITY:
- return FT_RENDER_MODE_LCD; */
+ case CLEARTYPE_QUALITY:
+ if (!gspv.bFontSmoothing)
+ break;
+ if (!gspv.uiFontSmoothingType)
+ break;
+ return FT_RENDER_MODE_LCD;
}
return FT_RENDER_MODE_NORMAL;
}
}
static BOOLEAN FASTCALL
-GetFontFamilyInfoForList(LPLOGFONTW LogFont,
+GetFontFamilyInfoForList(const LOGFONTW *LogFont,
PFONTFAMILYINFO Info,
LPCWSTR NominalName,
- DWORD *pCount,
- DWORD MaxCount,
+ LONG *pCount,
+ LONG MaxCount,
PLIST_ENTRY Head)
{
PLIST_ENTRY Entry;
PFONT_ENTRY CurrentEntry;
FONTGDI *FontGDI;
FONTFAMILYINFO InfoEntry;
- DWORD Count = *pCount;
+ LONG Count = *pCount;
for (Entry = Head->Flink; Entry != Head; Entry = Entry->Flink)
{
if (LogFont->lfCharSet != DEFAULT_CHARSET &&
LogFont->lfCharSet != FontGDI->CharSet)
{
- continue;
+ continue; /* charset mismatch */
}
- if (LogFont->lfFaceName[0] == UNICODE_NULL)
- {
- if (Count < MaxCount)
- {
- FontFamilyFillInfo(&Info[Count], NominalName, NULL, FontGDI);
- }
- Count++;
- continue;
- }
-
- FontFamilyFillInfo(&InfoEntry, NominalName, NULL, FontGDI);
+ /* get one info entry */
+ FontFamilyFillInfo(&InfoEntry, NULL, NULL, FontGDI);
- if (NominalName)
- {
- RtlStringCchCopyW(InfoEntry.EnumLogFontEx.elfLogFont.lfFaceName,
- RTL_NUMBER_OF(InfoEntry.EnumLogFontEx.elfLogFont.lfFaceName),
- NominalName);
- }
- else
+ if (LogFont->lfFaceName[0] != UNICODE_NULL)
{
+ /* check name */
if (_wcsnicmp(LogFont->lfFaceName,
InfoEntry.EnumLogFontEx.elfLogFont.lfFaceName,
RTL_NUMBER_OF(LogFont->lfFaceName) - 1) != 0 &&
}
}
- if (Count < MaxCount)
+ if (NominalName)
+ {
+ /* store the nominal name */
+ RtlStringCbCopyW(InfoEntry.EnumLogFontEx.elfLogFont.lfFaceName,
+ sizeof(InfoEntry.EnumLogFontEx.elfLogFont.lfFaceName),
+ NominalName);
+ }
+
+ /* store one entry to Info */
+ if (0 <= Count && Count < MaxCount)
{
RtlCopyMemory(&Info[Count], &InfoEntry, sizeof(InfoEntry));
}
}
static BOOLEAN FASTCALL
-GetFontFamilyInfoForSubstitutes(LPLOGFONTW LogFont,
+GetFontFamilyInfoForSubstitutes(const LOGFONTW *LogFont,
PFONTFAMILYINFO Info,
- DWORD *pCount,
- DWORD MaxCount)
+ LONG *pCount,
+ LONG MaxCount)
{
PLIST_ENTRY pEntry, pHead = &g_FontSubstListHead;
PFONTSUBST_ENTRY pCurrentEntry;
pFromW = &pCurrentEntry->FontNames[FONTSUBST_FROM];
if (LogFont->lfFaceName[0] != UNICODE_NULL)
{
+ /* check name */
if (_wcsicmp(LogFont->lfFaceName, pFromW->Buffer) != 0)
continue; /* mismatch */
}
pCurrentEntry->CharSets[FONTSUBST_FROM] ==
pCurrentEntry->CharSets[FONTSUBST_TO])
{
+ /* identical mapping */
continue;
}
+ /* substitute and get the real name */
IntUnicodeStringToBuffer(lf.lfFaceName, sizeof(lf.lfFaceName), pFromW);
SubstituteFontRecurse(&lf);
if (LogFont->lfCharSet != DEFAULT_CHARSET && LogFont->lfCharSet != lf.lfCharSet)
continue;
+ /* search in global fonts */
IntLockGlobalFonts();
GetFontFamilyInfoForList(&lf, Info, pFromW->Buffer, pCount, MaxCount, &g_FontListHead);
IntUnLockGlobalFonts();
+ /* search in private fonts */
IntLockProcessPrivateFonts(Win32Process);
GetFontFamilyInfoForList(&lf, Info, pFromW->Buffer, pCount, MaxCount,
&Win32Process->PrivateFontListHead);
IntUnLockProcessPrivateFonts(Win32Process);
- break;
+
+ if (LogFont->lfFaceName[0] != UNICODE_NULL)
+ {
+ /* it's already matched to the exact name and charset if the name
+ was specified at here, then so don't scan more for another name */
+ break;
+ }
}
return TRUE;
}
-static void FTVectorToPOINTFX(FT_Vector *vec, POINTFX *pt)
-{
- pt->x.value = vec->x >> 6;
- pt->x.fract = (vec->x & 0x3f) << 10;
- pt->x.fract |= ((pt->x.fract >> 6) | (pt->x.fract >> 12));
- pt->y.value = vec->y >> 6;
- pt->y.fract = (vec->y & 0x3f) << 10;
- pt->y.fract |= ((pt->y.fract >> 6) | (pt->y.fract >> 12));
-}
-
-/*
- This function builds an FT_Fixed from a float. It puts the integer part
- in the highest 16 bits and the decimal part in the lowest 16 bits of the FT_Fixed.
- It fails if the integer part of the float number is greater than SHORT_MAX.
-*/
-static __inline FT_Fixed FT_FixedFromFloat(float f)
-{
- short value = f;
- unsigned short fract = (f - value) * 0xFFFF;
- return (FT_Fixed)((long)value << 16 | (unsigned long)fract);
-}
-
-/*
- This function builds an FT_Fixed from a FIXED. It simply put f.value
- in the highest 16 bits and f.fract in the lowest 16 bits of the FT_Fixed.
-*/
-static __inline FT_Fixed FT_FixedFromFIXED(FIXED f)
-{
- return (FT_Fixed)((long)f.value << 16 | (unsigned long)f.fract);
-}
-
static unsigned int get_native_glyph_outline(FT_Outline *outline, unsigned int buflen, char *buf)
{
TTPOLYGONHEADER *pph;
FontGDI->EmHeight = min(FontGDI->EmHeight, USHORT_MAX);
FontGDI->Magic = FONTGDI_MAGIC;
- if (lfHeight > 0)
- EmHeight64 = (FontGDI->EmHeight << 6) + 31;
- else
- EmHeight64 = (FontGDI->EmHeight << 6);
+ EmHeight64 = (FontGDI->EmHeight << 6);
req.type = FT_SIZE_REQUEST_TYPE_NOMINAL;
req.width = 0;
if (aveWidth && potm)
{
widthRatio = (FLOAT)aveWidth * eM11 /
- (FLOAT) potm->otmTextMetrics.tmAveCharWidth;
+ (FLOAT)potm->otmTextMetrics.tmAveCharWidth;
}
left = (INT)(ft_face->glyph->metrics.horiBearingX * widthRatio) & -64;
FT_Matrix rotationMat;
FT_Vector vecAngle;
DPRINT("Rotation Trans!\n");
- angle = FT_FixedFromFloat((float)orientation / 10.0);
+ angle = FT_FixedFromFloat((FLOAT)orientation / 10.0);
FT_Vector_Unit(&vecAngle, angle);
rotationMat.xx = vecAngle.x;
rotationMat.xy = -vecAngle.y;
switch (iFormat)
{
case GGO_BITMAP:
+ {
width = gm.gmBlackBoxX;
height = gm.gmBlackBoxY;
pitch = ((width + 31) >> 5) << 2;
}
case ft_glyph_format_outline:
+ {
ft_bitmap.width = width;
ft_bitmap.rows = height;
ft_bitmap.pitch = pitch;
FT_Outline_Get_Bitmap(g_FreeTypeLibrary, &ft_face->glyph->outline, &ft_bitmap);
IntUnLockFreeType();
break;
+ }
default:
DPRINT1("Loaded glyph format %x\n", ft_face->glyph->format);
return GDI_ERROR;
}
+
break;
+ }
case GGO_GRAY2_BITMAP:
case GGO_GRAY4_BITMAP:
DPRINT1("Loaded glyph format %x\n", ft_face->glyph->format);
return GDI_ERROR;
}
+
+ break;
}
case GGO_NATIVE:
IntUnLockFreeType();
break;
}
+
case GGO_BEZIER:
{
FT_Outline *outline = &ft_face->glyph->outline;
ActualNameW = (WCHAR*)((ULONG_PTR)Otm + (ULONG_PTR)Otm->otmpFamilyName);
- if (LogFont->lfFaceName[0])
+ if (LogFont->lfFaceName[0] != UNICODE_NULL)
{
BOOL Found = FALSE;
// Functions needing sorting.
//
///////////////////////////////////////////////////////////////////////////
-int APIENTRY
+
+LONG FASTCALL
+IntGetFontFamilyInfo(HDC Dc,
+ const LOGFONTW *SafeLogFont,
+ PFONTFAMILYINFO SafeInfo,
+ LONG InfoCount)
+{
+ LONG AvailCount = 0;
+ PPROCESSINFO Win32Process;
+
+ /* Enumerate font families in the global list */
+ IntLockGlobalFonts();
+ if (!GetFontFamilyInfoForList(SafeLogFont, SafeInfo, NULL, &AvailCount,
+ InfoCount, &g_FontListHead))
+ {
+ IntUnLockGlobalFonts();
+ return -1;
+ }
+ IntUnLockGlobalFonts();
+
+ /* Enumerate font families in the process local list */
+ Win32Process = PsGetCurrentProcessWin32Process();
+ IntLockProcessPrivateFonts(Win32Process);
+ if (!GetFontFamilyInfoForList(SafeLogFont, SafeInfo, NULL, &AvailCount, InfoCount,
+ &Win32Process->PrivateFontListHead))
+ {
+ IntUnLockProcessPrivateFonts(Win32Process);
+ return -1;
+ }
+ IntUnLockProcessPrivateFonts(Win32Process);
+
+ /* Enumerate font families in the registry */
+ if (!GetFontFamilyInfoForSubstitutes(SafeLogFont, SafeInfo, &AvailCount, InfoCount))
+ {
+ return -1;
+ }
+
+ return AvailCount;
+}
+
+LONG NTAPI
NtGdiGetFontFamilyInfo(HDC Dc,
- LPLOGFONTW UnsafeLogFont,
+ const LOGFONTW *UnsafeLogFont,
PFONTFAMILYINFO UnsafeInfo,
- DWORD Size)
+ LPLONG UnsafeInfoCount)
{
NTSTATUS Status;
LOGFONTW LogFont;
PFONTFAMILYINFO Info;
- DWORD Count;
- PPROCESSINFO Win32Process;
+ LONG GotCount, AvailCount, SafeInfoCount;
+ ULONG DataSize;
- /* Make a safe copy */
- Status = MmCopyFromCaller(&LogFont, UnsafeLogFont, sizeof(LOGFONTW));
- if (! NT_SUCCESS(Status))
+ if (UnsafeLogFont == NULL || UnsafeInfo == NULL || UnsafeInfoCount == NULL)
{
EngSetLastError(ERROR_INVALID_PARAMETER);
return -1;
}
- /* Allocate space for a safe copy */
- Info = ExAllocatePoolWithTag(PagedPool, Size * sizeof(FONTFAMILYINFO), GDITAG_TEXT);
- if (NULL == Info)
+ Status = MmCopyFromCaller(&SafeInfoCount, UnsafeInfoCount, sizeof(SafeInfoCount));
+ if (!NT_SUCCESS(Status))
{
- EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
+ EngSetLastError(ERROR_INVALID_PARAMETER);
return -1;
}
-
- /* Enumerate font families in the global list */
- IntLockGlobalFonts();
- Count = 0;
- if (! GetFontFamilyInfoForList(&LogFont, Info, NULL, &Count, Size, &g_FontListHead) )
+ GotCount = 0;
+ Status = MmCopyToCaller(UnsafeInfoCount, &GotCount, sizeof(*UnsafeInfoCount));
+ if (!NT_SUCCESS(Status))
{
- IntUnLockGlobalFonts();
- ExFreePoolWithTag(Info, GDITAG_TEXT);
+ EngSetLastError(ERROR_INVALID_PARAMETER);
return -1;
}
- IntUnLockGlobalFonts();
-
- /* Enumerate font families in the process local list */
- Win32Process = PsGetCurrentProcessWin32Process();
- IntLockProcessPrivateFonts(Win32Process);
- if (! GetFontFamilyInfoForList(&LogFont, Info, NULL, &Count, Size,
- &Win32Process->PrivateFontListHead))
+ Status = MmCopyFromCaller(&LogFont, UnsafeLogFont, sizeof(LOGFONTW));
+ if (!NT_SUCCESS(Status))
{
- IntUnLockProcessPrivateFonts(Win32Process);
- ExFreePoolWithTag(Info, GDITAG_TEXT);
+ EngSetLastError(ERROR_INVALID_PARAMETER);
+ return -1;
+ }
+ if (SafeInfoCount <= 0)
+ {
+ EngSetLastError(ERROR_INVALID_PARAMETER);
return -1;
}
- IntUnLockProcessPrivateFonts(Win32Process);
- /* Enumerate font families in the registry */
- if (! GetFontFamilyInfoForSubstitutes(&LogFont, Info, &Count, Size))
+ /* Allocate space for a safe copy */
+ Status = RtlULongMult(SafeInfoCount, sizeof(FONTFAMILYINFO), &DataSize);
+ if (!NT_SUCCESS(Status) || DataSize > LONG_MAX)
{
- ExFreePoolWithTag(Info, GDITAG_TEXT);
+ DPRINT1("Overflowed.\n");
+ EngSetLastError(ERROR_INVALID_PARAMETER);
return -1;
}
+ Info = ExAllocatePoolWithTag(PagedPool, DataSize, GDITAG_TEXT);
+ if (Info == NULL)
+ {
+ EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
+ return -1;
+ }
+
+ /* Retrieve the information */
+ AvailCount = IntGetFontFamilyInfo(Dc, &LogFont, Info, SafeInfoCount);
+ GotCount = min(AvailCount, SafeInfoCount);
+ SafeInfoCount = AvailCount;
/* Return data to caller */
- if (0 != Count)
+ if (GotCount > 0)
{
- Status = MmCopyToCaller(UnsafeInfo, Info,
- (Count < Size ? Count : Size) * sizeof(FONTFAMILYINFO));
- if (! NT_SUCCESS(Status))
+ Status = RtlULongMult(GotCount, sizeof(FONTFAMILYINFO), &DataSize);
+ if (!NT_SUCCESS(Status) || DataSize > LONG_MAX)
+ {
+ DPRINT1("Overflowed.\n");
+ ExFreePoolWithTag(Info, GDITAG_TEXT);
+ EngSetLastError(ERROR_INVALID_PARAMETER);
+ return -1;
+ }
+ Status = MmCopyToCaller(UnsafeInfo, Info, DataSize);
+ if (!NT_SUCCESS(Status))
+ {
+ ExFreePoolWithTag(Info, GDITAG_TEXT);
+ EngSetLastError(ERROR_INVALID_PARAMETER);
+ return -1;
+ }
+ Status = MmCopyToCaller(UnsafeInfoCount, &SafeInfoCount, sizeof(*UnsafeInfoCount));
+ if (!NT_SUCCESS(Status))
{
ExFreePoolWithTag(Info, GDITAG_TEXT);
EngSetLastError(ERROR_INVALID_PARAMETER);
ExFreePoolWithTag(Info, GDITAG_TEXT);
- return Count;
+ return GotCount;
}
FORCEINLINE
String,
Count,
(const INT *)Dx);
- DC_UnlockDc(dc);
return bResult;
}
if (pdcattr->flTextAlign & TA_UPDATECP)
{
- Start.x = pdcattr->ptlCurrent.x;
- Start.y = pdcattr->ptlCurrent.y;
- } else {
+ IntGetCurrentPositionEx(dc, &Start);
+ }
+ else
+ {
Start.x = XStart;
Start.y = YStart;
}
if ((fuOptions & ETO_OPAQUE) && (dc->pdcattr->ulDirty_ & DIRTY_BACKGROUND))
DC_vUpdateBackgroundBrush(dc) ;
- if(dc->pdcattr->ulDirty_ & DIRTY_TEXT)
+ if (dc->pdcattr->ulDirty_ & DIRTY_TEXT)
DC_vUpdateTextBrush(dc) ;
thickness = 1;
// invert y axis
IntEscapeMatrix(&matEscape, -lfEscapement);
+ matWorld.yx = -matWorld.yx;
+ matWorld.xy = -matWorld.xy;
+
// convert vecs
for (i = 0; i < 9; ++i)
{
- POINT pt;
FT_Vector_Transform(&vecs[i], &matWidth);
FT_Vector_Transform(&vecs[i], &matEscape);
- vecs[i].x += (Start.x << 16) + (XStart64 << 10);
- vecs[i].y += (Start.y << 16) + (YStart64 << 10);
- pt.x = vecs[i].x >> 16;
- pt.y = vecs[i].y >> 16;
+ FT_Vector_Transform(&vecs[i], &matWorld);
+ }
+ vecs[2].x += DeltaX64 << 10;
+ vecs[2].y += DeltaY64 << 10; // upper right
+ vecs[3].x += DeltaX64 << 10;
+ vecs[3].y += DeltaY64 << 10; // lower right
+ vecs[6].x += DeltaX64 << 10;
+ vecs[6].y += DeltaY64 << 10; // underline right
+ vecs[8].x += DeltaX64 << 10;
+ vecs[8].y += DeltaY64 << 10; // strike through right
+
+ {
+ POINT pt;
+ pt.x = Start.x + (XStart64 >> 6);
+ pt.y = Start.y + (YStart64 >> 6);
IntLPtoDP(dc, &pt, 1);
- vecs[i].x = pt.x + dc->ptlDCOrig.x;
- vecs[i].y = pt.y + dc->ptlDCOrig.y;
- }
- vecs[2].x += DeltaX64 >> 6;
- vecs[2].y += DeltaY64 >> 6; // upper right
- vecs[3].x += DeltaX64 >> 6;
- vecs[3].y += DeltaY64 >> 6; // lower right
- vecs[6].x += DeltaX64 >> 6;
- vecs[6].y += DeltaY64 >> 6; // underline right
- vecs[8].x += DeltaX64 >> 6;
- vecs[8].y += DeltaY64 >> 6; // strike through right
+
+ for (i = 0; i < 9; ++i)
+ {
+ vecs[i].x += pt.x << 16;
+ vecs[i].y += pt.y << 16;
+ vecs[i].x >>= 16;
+ vecs[i].y >>= 16;
+ vecs[i].x += dc->ptlDCOrig.x;
+ vecs[i].y += dc->ptlDCOrig.y;
+ }
+ }
if (fuOptions & ETO_OPAQUE)
{
MouseSafetyOnDrawEnd(dc->ppdev);
}
- if (pdcattr->flTextAlign & TA_UPDATECP) {
- pdcattr->ptlCurrent.x = DestRect.right - dc->ptlDCOrig.x;
+ if (pdcattr->flTextAlign & TA_UPDATECP)
+ {
+ pdcattr->ptlCurrent.x = vecs[2].x - dc->ptlDCOrig.x;
+ pdcattr->ptlCurrent.y = vecs[2].y - dc->ptlDCOrig.y;
+ IntDPtoLP(dc, &pdcattr->ptlCurrent, 1);
+ pdcattr->ulDirty_ &= ~DIRTY_PTLCURRENT;
+ pdcattr->ulDirty_ |= (DIRTY_PTFXCURRENT | DIRTY_STYLESTATE);
}
IntUnLockFreeType();
if(Safepwch)
ExFreePoolWithTag(Safepwch , GDITAG_TEXT);
- if (! NT_SUCCESS(Status))
+ if (!NT_SUCCESS(Status))
{
SetLastNtError(Status);
return FALSE;