diff --git a/win32ss/gdi/ntgdi/font.c b/win32ss/gdi/ntgdi/font.c index 7d1aebbb66..b78a3adc25 100644 --- a/win32ss/gdi/ntgdi/font.c +++ b/win32ss/gdi/ntgdi/font.c @@ -12,7 +12,7 @@ #include -#define NDEBUG +//#define NDEBUG #include HFONT APIENTRY HfontCreate( IN PENUMLOGFONTEXDVW pelfw,IN ULONG cjElfw,IN LFTYPE lft,IN FLONG fl,IN PVOID pvCliData ); @@ -22,6 +22,7 @@ HFONT APIENTRY HfontCreate( IN PENUMLOGFONTEXDVW pelfw,IN ULONG cjElfw,IN LFTYPE HFONT FASTCALL GreCreateFontIndirectW( LOGFONTW *lplf ) { + DPRINT("\n"); if (lplf) { ENUMLOGFONTEXDVW Logfont; @@ -57,6 +58,7 @@ GreGetKerningPairs( DWORD Count; KERNINGPAIR *pKP; + DPRINT("\n"); dc = DC_LockDc(hDC); if (!dc) { @@ -295,6 +297,7 @@ FontGetObject(PTEXTOBJ plfont, ULONG cjBuffer, PVOID pvBuffer) ULONG cjMaxSize; ENUMLOGFONTEXDVW *plf = &plfont->logfont; + DPRINT("\n"); /* If buffer is NULL, only the size is requested */ if (pvBuffer == NULL) return sizeof(LOGFONTW); @@ -325,6 +328,7 @@ IntGetCharDimensions(HDC hdc, PTEXTMETRICW ptm, PDWORD height) 'r','s','t','u','v','w','x','y','z','A','B','C','D','E','F','G','H', 'I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z',0}; + DPRINT("\n"); if(!ftGdiGetTextMetricsW(hdc, &tmwi)) return 0; pdc = DC_LockDc(hdc); @@ -368,6 +372,7 @@ IntGetFontLanguageInfo(PDC Dc) DWORD result=0; + DPRINT("\n"); ftGdiGetTextCharsetInfo( Dc, &fontsig, 0 ); /* We detect each flag we return using a bitmask on the Codepage Bitfields */ @@ -409,6 +414,7 @@ RealizeFontInit(HFONT hFont) NTSTATUS Status = STATUS_SUCCESS; PTEXTOBJ pTextObj; + DPRINT("\n"); pTextObj = TEXTOBJ_LockText(hFont); if ( pTextObj && !(pTextObj->fl & TEXTOBJECT_INIT)) @@ -539,6 +545,7 @@ APIENTRY NtGdiRemoveFontMemResourceEx( IN HANDLE hMMFont) { + DPRINT("\n"); return IntGdiRemoveFontMemResource(hMMFont); } @@ -556,6 +563,7 @@ NtGdiGetCharacterPlacementW( IN OUT LPGCP_RESULTSW pgcpw, IN DWORD dwFlags) { + DPRINT("\n"); UNIMPLEMENTED; return 0; #if 0 @@ -585,6 +593,7 @@ NtGdiGetFontData( DWORD Result = GDI_ERROR; NTSTATUS Status = STATUS_SUCCESS; + DPRINT("\n"); if (Buffer && Size) { _SEH2_TRY @@ -645,6 +654,7 @@ NtGdiGetFontUnicodeRanges( PGLYPHSET pgsSafe; NTSTATUS Status = STATUS_SUCCESS; + DPRINT("\n"); pDc = DC_LockDc(hdc); if (!pDc) { @@ -719,6 +729,7 @@ NtGdiGetGlyphOutline( GLYPHMETRICS gm; NTSTATUS Status = STATUS_SUCCESS; + DPRINT("\n"); dc = DC_LockDc(hdc); if (!dc) { @@ -800,6 +811,7 @@ NtGdiGetKerningPairs(HDC hDC, KERNINGPAIR *pKP; NTSTATUS Status = STATUS_SUCCESS; + DPRINT("\n"); dc = DC_LockDc(hDC); if (!dc) { @@ -876,6 +888,7 @@ NtGdiGetOutlineTextMetricsInternalW (HDC hDC, OUTLINETEXTMETRICW *potm; NTSTATUS Status = STATUS_SUCCESS; + DPRINT("\n"); dc = DC_LockDc(hDC); if (!dc) { @@ -950,6 +963,7 @@ NtGdiGetFontResourceInfoInternalW( ULONG cbStringSize; LPVOID Buffer; + DPRINT("\n"); /* FIXME: Handle cFiles > 0 */ /* Check for valid dwType values */ @@ -1061,6 +1075,7 @@ NtGdiGetRealizationInfo( INT i = 0; REALIZATION_INFO ri; + DPRINT("\n"); pDc = DC_LockDc(hdc); if (!pDc) { @@ -1126,6 +1141,7 @@ HfontCreate( HFONT hNewFont; PLFONT plfont; + DPRINT("\n"); if (!pelfw) { return NULL; @@ -1180,6 +1196,7 @@ NtGdiHfontCreate( ENUMLOGFONTEXDVW SafeLogfont; NTSTATUS Status = STATUS_SUCCESS; + DPRINT("\n"); /* Silence GCC warnings */ SafeLogfont.elfEnumLogfontEx.elfLogFont.lfEscapement = 0; SafeLogfont.elfEnumLogfontEx.elfLogFont.lfOrientation = 0; diff --git a/win32ss/gdi/ntgdi/freetype.c b/win32ss/gdi/ntgdi/freetype.c index 5275b36576..a8263f49e1 100644 --- a/win32ss/gdi/ntgdi/freetype.c +++ b/win32ss/gdi/ntgdi/freetype.c @@ -33,7 +33,7 @@ #include #include "font.h" -#define NDEBUG +//#define NDEBUG #include /* TPMF_FIXED_PITCH is confusing; brain-dead api */ @@ -195,6 +195,7 @@ static RTL_STATIC_LIST_HEAD(g_FontSubstListHead); static void SharedMem_AddRef(PSHARED_MEM Ptr) { + DPRINT("\n"); ASSERT_FREETYPE_LOCK_HELD(); ++Ptr->RefCount; @@ -203,6 +204,7 @@ SharedMem_AddRef(PSHARED_MEM Ptr) static void SharedFaceCache_Init(PSHARED_FACE_CACHE Cache) { + DPRINT("\n"); Cache->OutlineRequiredSize = 0; RtlInitUnicodeString(&Cache->FontFamily, NULL); RtlInitUnicodeString(&Cache->FullName, NULL); @@ -212,6 +214,7 @@ static PSHARED_FACE SharedFace_Create(FT_Face Face, PSHARED_MEM Memory) { PSHARED_FACE Ptr; + DPRINT("\n"); Ptr = ExAllocatePoolWithTag(PagedPool, sizeof(SHARED_FACE), TAG_FONT); if (Ptr) { @@ -231,6 +234,7 @@ static PSHARED_MEM SharedMem_Create(PBYTE Buffer, ULONG BufferSize, BOOL IsMapping) { PSHARED_MEM Ptr; + DPRINT("\n"); Ptr = ExAllocatePoolWithTag(PagedPool, sizeof(SHARED_MEM), TAG_FONT); if (Ptr) { @@ -246,6 +250,7 @@ SharedMem_Create(PBYTE Buffer, ULONG BufferSize, BOOL IsMapping) static void SharedFace_AddRef(PSHARED_FACE Ptr) { + DPRINT("\n"); ASSERT_FREETYPE_LOCK_HELD(); ++Ptr->RefCount; @@ -254,6 +259,7 @@ SharedFace_AddRef(PSHARED_FACE Ptr) static void RemoveCachedEntry(PFONT_CACHE_ENTRY Entry) { + DPRINT("\n"); ASSERT_FREETYPE_LOCK_HELD(); FT_Done_Glyph((FT_Glyph)Entry->BitmapGlyph); @@ -268,6 +274,7 @@ RemoveCacheEntries(FT_Face Face) { PLIST_ENTRY CurrentEntry, NextEntry; PFONT_CACHE_ENTRY FontEntry; + DPRINT("\n"); ASSERT_FREETYPE_LOCK_HELD(); @@ -287,6 +294,7 @@ RemoveCacheEntries(FT_Face Face) static void SharedMem_Release(PSHARED_MEM Ptr) { + DPRINT("\n"); ASSERT_FREETYPE_LOCK_HELD(); ASSERT(Ptr->RefCount > 0); @@ -308,6 +316,7 @@ static void SharedMem_Release(PSHARED_MEM Ptr) static void SharedFaceCache_Release(PSHARED_FACE_CACHE Cache) { + DPRINT("\n"); RtlFreeUnicodeString(&Cache->FontFamily); RtlFreeUnicodeString(&Cache->FullName); } @@ -315,6 +324,7 @@ SharedFaceCache_Release(PSHARED_FACE_CACHE Cache) static void SharedFace_Release(PSHARED_FACE Ptr) { + DPRINT("\n"); IntLockFreeType(); ASSERT(Ptr->RefCount > 0); @@ -360,6 +370,7 @@ IntLoadFontSubstList(PLIST_ENTRY pHead) RTL_CONSTANT_STRING(L"\\Registry\\Machine\\Software\\" L"Microsoft\\Windows NT\\CurrentVersion\\" L"FontSubstitutes"); + DPRINT("\n"); /* open registry key */ InitializeObjectAttributes(&ObjectAttributes, &FontSubstKey, @@ -493,6 +504,7 @@ BOOL FASTCALL InitFontSupport(VOID) { ULONG ulError; + DPRINT("\n"); InitializeListHead(&g_FontListHead); InitializeListHead(&g_FontCacheListHead); @@ -532,6 +544,7 @@ FtSetCoordinateTransform( { FT_Matrix ftmatrix; FLOATOBJ efTemp; + DPRINT("\n"); /* Create a freetype matrix, by converting to 16.16 fixpoint format */ efTemp = pmx->efM11; @@ -564,6 +577,7 @@ SubstituteFontByList(PLIST_ENTRY pHead, PLIST_ENTRY pListEntry; PFONTSUBST_ENTRY pSubstEntry; BYTE CharSets[FONTSUBST_FROM_AND_TO]; + DPRINT("\n"); CharSetMap[FONTSUBST_FROM] = DEFAULT_CHARSET; CharSetMap[FONTSUBST_TO] = RequestedCharSet; @@ -624,6 +638,7 @@ SubstituteFontRecurse(LOGFONTW* pLogFont) BYTE CharSetMap[FONTSUBST_FROM_AND_TO]; BOOL Found; UNICODE_STRING InputNameW; + DPRINT("\n"); if (pLogFont->lfFaceName[0] == UNICODE_NULL) return FALSE; @@ -677,6 +692,7 @@ IntLoadSystemFonts(VOID) RTL_CONSTANT_STRING(L"*.fnt") }; + DPRINT("\n"); RtlInitUnicodeString(&Directory, L"\\SystemRoot\\Fonts\\"); InitializeObjectAttributes( @@ -762,6 +778,7 @@ IntLoadSystemFonts(VOID) static BYTE ItalicFromStyle(const char *style_name) { + DPRINT("\n"); if (style_name == NULL || style_name[0] == 0) return FALSE; if (strstr(style_name, "Italic") != NULL) @@ -774,6 +791,7 @@ ItalicFromStyle(const char *style_name) static LONG WeightFromStyle(const char *style_name) { + DPRINT("\n"); if (style_name == NULL || style_name[0] == 0) return FW_NORMAL; if (strstr(style_name, "Regular") != NULL) @@ -840,6 +858,7 @@ IntGdiLoadFontsFromMemory(PGDI_LOAD_FONT pLoadFont, FT_ULong os2_ulCodePageRange1; FT_UShort os2_usWeightClass; + DPRINT("\n"); if (SharedFace == NULL && CharSetIndex == -1) { /* load a face from memory */ @@ -1137,6 +1156,8 @@ IntGdiAddFontResource(PUNICODE_STRING FileName, DWORD Characteristics) HANDLE KeyHandle; static const UNICODE_STRING TrueTypePostfix = RTL_CONSTANT_STRING(L" (TrueType)"); + DPRINT("\n"); + /* Open the font file */ InitializeObjectAttributes(&ObjectAttributes, FileName, 0, NULL, NULL); Status = ZwOpenFile( @@ -1243,6 +1264,7 @@ IntGdiAddFontMemResource(PVOID Buffer, DWORD dwSize, PDWORD pNumAdded) PVOID BufferCopy = ExAllocatePoolWithTag(PagedPool, dwSize, TAG_FONT); + DPRINT("\n"); if (!BufferCopy) { *pNumAdded = 0; @@ -1292,6 +1314,7 @@ CleanupFontEntry(PFONT_ENTRY FontEntry) PFONTGDI FontGDI = FontEntry->Font; PSHARED_FACE SharedFace = FontGDI->SharedFace; + DPRINT("\n"); if (FontGDI->Filename) ExFreePoolWithTag(FontGDI->Filename, GDITAG_PFF); @@ -1306,6 +1329,7 @@ IntGdiCleanupMemEntry(PFONT_ENTRY_MEM Head) PLIST_ENTRY Entry; PFONT_ENTRY_MEM FontEntry; + DPRINT("\n"); while (!IsListEmpty(&Head->ListEntry)) { Entry = RemoveHeadList(&Head->ListEntry); @@ -1324,6 +1348,7 @@ UnlinkFontMemCollection(PFONT_ENTRY_COLL_MEM Collection) { PFONT_ENTRY_MEM FontMemEntry = Collection->Entry; PLIST_ENTRY ListEntry; + DPRINT("\n"); RemoveEntryList(&Collection->ListEntry); do { @@ -1343,6 +1368,7 @@ IntGdiRemoveFontMemResource(HANDLE hMMFont) PFONT_ENTRY_COLL_MEM CurrentEntry; PFONT_ENTRY_COLL_MEM EntryCollection = NULL; PPROCESSINFO Win32Process = PsGetCurrentProcessWin32Process(); + DPRINT("\n"); IntLockProcessPrivateFonts(Win32Process); for (Entry = Win32Process->PrivateMemFontListHead.Flink; @@ -1422,6 +1448,7 @@ IntIsFontRenderingEnabled(VOID) BOOL Ret = g_RenderingEnabled; HDC hDC; + DPRINT("\n"); hDC = IntGetScreenDC(); if (hDC) Ret = (NtGdiGetDeviceCaps(hDC, BITSPIXEL) > 8) && g_RenderingEnabled; @@ -1438,6 +1465,7 @@ IntEnableFontRendering(BOOL Enable) FT_Render_Mode FASTCALL IntGetFontRenderMode(LOGFONTW *logfont) { + DPRINT("\n"); switch (logfont->lfQuality) { case ANTIALIASED_QUALITY: @@ -1459,6 +1487,7 @@ TextIntCreateFontIndirect(CONST LPLOGFONTW lf, HFONT *NewFont) PLFONT plfont; LOGFONTW *plf; + DPRINT("\n"); plfont = LFONT_AllocFontWithHandle(); if (!plfont) { @@ -1504,6 +1533,7 @@ IntTranslateCharsetInfo(PDWORD Src, /* [in] { int Index = 0; + DPRINT("\n"); switch (Flags) { case TCI_SRCFONTSIG: @@ -1543,6 +1573,7 @@ static BOOL face_has_symbol_charmap(FT_Face ft_face) { int i; + DPRINT("\n"); for(i = 0; i < ft_face->num_charmaps; i++) { if (ft_face->charmaps[i]->platform_id == TT_PLATFORM_MICROSOFT && @@ -1563,6 +1594,7 @@ FillTMEx(TEXTMETRICW *TM, PFONTGDI FontGDI, int Ascent, Descent; FT_Face Face = FontGDI->SharedFace->Face; + DPRINT("\n"); XScale = Face->size->metrics.x_scale; YScale = Face->size->metrics.y_scale; @@ -1799,6 +1831,7 @@ FillTM(TEXTMETRICW *TM, PFONTGDI FontGDI, TT_OS2 *pOS2, TT_HoriHeader *pHori, FT_WinFNT_HeaderRec *pFNT) { + DPRINT("\n"); FillTMEx(TM, FontGDI, pOS2, pHori, pFNT, FALSE); } @@ -1827,6 +1860,7 @@ IntGetOutlineTextMetrics(PFONTGDI FontGDI, PSHARED_FACE_CACHE Cache = (PRIMARYLANGID(gusLanguageID) == LANG_ENGLISH) ? &SharedFace->EnglishUS : &SharedFace->UserLanguage; FT_Face Face = SharedFace->Face; + DPRINT("\n"); if (Cache->OutlineRequiredSize && Size < Cache->OutlineRequiredSize) { return Cache->OutlineRequiredSize; @@ -1991,6 +2025,7 @@ FindFaceNameInList(PUNICODE_STRING FaceName, PLIST_ENTRY Head) FONTGDI *FontGDI; NTSTATUS status; + DPRINT("\n"); for (Entry = Head->Flink; Entry != Head; Entry = Entry->Flink) { CurrentEntry = CONTAINING_RECORD(Entry, FONT_ENTRY, ListEntry); @@ -2029,6 +2064,7 @@ FindFaceNameInLists(PUNICODE_STRING FaceName) PPROCESSINFO Win32Process; PFONTGDI Font; + DPRINT("\n"); /* Search the process local list. We do not have to search the 'Mem' list, since those fonts are linked in the PrivateFontListHead */ Win32Process = PsGetCurrentProcessWin32Process(); @@ -2053,6 +2089,7 @@ static BYTE CharSetFromLangID(LANGID LangID) { /* FIXME: Add more and fix if wrong */ + DPRINT("\n"); switch (PRIMARYLANGID(LangID)) { case LANG_CHINESE: @@ -2097,6 +2134,7 @@ static void SwapEndian(LPVOID pvData, DWORD Size) { BYTE b, *pb = pvData; + DPRINT("\n"); Size /= 2; while (Size-- > 0) { @@ -2112,6 +2150,7 @@ DuplicateUnicodeString(PUNICODE_STRING Source, PUNICODE_STRING Destination) { NTSTATUS Status = STATUS_NO_MEMORY; UNICODE_STRING Tmp; + DPRINT("\n"); Tmp.Buffer = ExAllocatePoolWithTag(PagedPool, Source->MaximumLength, TAG_USTR); if (Tmp.Buffer) @@ -2142,6 +2181,7 @@ IntGetFontLocalizedName(PUNICODE_STRING pNameW, PSHARED_FACE SharedFace, PSHARED_FACE_CACHE Cache; FT_Face Face = SharedFace->Face; + DPRINT("\n"); RtlFreeUnicodeString(pNameW); /* select cache */ @@ -2310,6 +2350,7 @@ FontFamilyFillInfo(PFONTFAMILYINFO Info, LPCWSTR FaceName, FT_Face Face = SharedFace->Face; UNICODE_STRING NameW; + DPRINT("\n"); RtlInitUnicodeString(&NameW, NULL); RtlZeroMemory(Info, sizeof(FONTFAMILYINFO)); Size = IntGetOutlineTextMetrics(FontGDI, 0, NULL); @@ -2477,6 +2518,7 @@ FindFaceNameInInfo(PUNICODE_STRING FaceName, PFONTFAMILYINFO Info, DWORD InfoEnt { DWORD i; UNICODE_STRING InfoFaceName; + DPRINT("\n"); for (i = 0; i < InfoEntries; i++) { @@ -2495,6 +2537,7 @@ FontFamilyInclude(LPLOGFONTW LogFont, PUNICODE_STRING FaceName, PFONTFAMILYINFO Info, DWORD InfoEntries) { UNICODE_STRING LogFontFaceName; + DPRINT("\n"); RtlInitUnicodeString(&LogFontFaceName, LogFont->lfFaceName); if (0 != LogFontFaceName.Length && @@ -2514,6 +2557,7 @@ FontFamilyFound(PFONTFAMILYINFO InfoEntry, LPWSTR pFullName1 = InfoEntry->EnumLogFontEx.elfFullName; LPWSTR pFullName2; DWORD i; + DPRINT("\n"); for (i = 0; i < InfoCount; ++i) { @@ -2543,6 +2587,7 @@ GetFontFamilyInfoForList(LPLOGFONTW LogFont, FONTFAMILYINFO InfoEntry; DWORD Count = *pCount; + DPRINT("\n"); for (Entry = Head->Flink; Entry != Head; Entry = Entry->Flink) { CurrentEntry = CONTAINING_RECORD(Entry, FONT_ENTRY, ListEntry); @@ -2601,6 +2646,7 @@ GetFontFamilyInfoForSubstitutes(LPLOGFONTW LogFont, LOGFONTW lf = *LogFont; UNICODE_STRING NameW; + DPRINT("\n"); for (pEntry = pHead->Flink; pEntry != pHead; pEntry = pEntry->Flink) { pCurrentEntry = CONTAINING_RECORD(pEntry, FONTSUBST_ENTRY, ListEntry); @@ -2636,6 +2682,7 @@ BOOL FASTCALL ftGdiGetRasterizerCaps(LPRASTERIZER_STATUS lprs) { + DPRINT("\n"); if ( lprs ) { lprs->nSize = sizeof(RASTERIZER_STATUS); @@ -2653,6 +2700,7 @@ SameScaleMatrix( PMATRIX pmx1, PMATRIX pmx2) { + DPRINT("\n"); return (FLOATOBJ_Equal(&pmx1->efM11, &pmx2->efM11) && FLOATOBJ_Equal(&pmx1->efM12, &pmx2->efM12) && FLOATOBJ_Equal(&pmx1->efM21, &pmx2->efM21) && @@ -2670,6 +2718,7 @@ ftGdiGlyphCacheGet( PLIST_ENTRY CurrentEntry; PFONT_CACHE_ENTRY FontEntry; + DPRINT("\n"); ASSERT_FREETYPE_LOCK_HELD(); for (CurrentEntry = g_FontCacheListHead.Flink; @@ -2707,6 +2756,7 @@ ftGdiGlyphSet( FT_Bitmap AlignedBitmap; FT_BitmapGlyph BitmapGlyph; + DPRINT("\n"); error = FT_Get_Glyph(GlyphSlot, &Glyph); if (error) { @@ -2752,6 +2802,7 @@ ftGdiGlyphCacheSet( FT_Bitmap AlignedBitmap; FT_BitmapGlyph BitmapGlyph; + DPRINT("\n"); ASSERT_FREETYPE_LOCK_HELD(); error = FT_Get_Glyph(GlyphSlot, &GlyphCopy); @@ -2811,6 +2862,7 @@ ftGdiGlyphCacheSet( static void FTVectorToPOINTFX(FT_Vector *vec, POINTFX *pt) { + DPRINT("\n"); pt->x.value = vec->x >> 6; pt->x.fract = (vec->x & 0x3f) << 10; pt->x.fract |= ((pt->x.fract >> 6) | (pt->x.fract >> 12)); @@ -2828,6 +2880,7 @@ static __inline FT_Fixed FT_FixedFromFloat(float f) { short value = f; unsigned short fract = (f - value) * 0xFFFF; + DPRINT("\n"); return (FT_Fixed)((long)value << 16 | (unsigned long)fract); } @@ -2837,6 +2890,7 @@ static __inline FT_Fixed FT_FixedFromFloat(float f) */ static __inline FT_Fixed FT_FixedFromFIXED(FIXED f) { + DPRINT("\n"); return (FT_Fixed)((long)f.value << 16 | (unsigned long)f.fract); } @@ -2848,6 +2902,7 @@ static unsigned int get_native_glyph_outline(FT_Outline *outline, unsigned int b unsigned int pph_start, cpfx; DWORD type; + DPRINT("\n"); for (contour = 0; contour < outline->n_contours; contour++) { /* Ignore contours containing one point */ @@ -2938,6 +2993,7 @@ static unsigned int get_bezier_glyph_outline(FT_Outline *outline, unsigned int b FT_Vector cubic_control[4]; unsigned int needed = 0; + DPRINT("\n"); for (contour = 0; contour < outline->n_contours; contour++) { pph_start = needed; @@ -3048,6 +3104,7 @@ IntRequestFontSize(PDC dc, PFONTGDI FontGDI, LONG lfWidth, LONG lfHeight) FT_WinFNT_HeaderRec WinFNT; LONG Ascent, Descent, Sum, EmHeight64; + DPRINT("\n"); lfWidth = abs(lfWidth); if (lfHeight == 0) { @@ -3152,6 +3209,7 @@ TextIntUpdateSize(PDC dc, FT_CharMap charmap, found; LOGFONTW *plf; + DPRINT("\n"); if (bDoLock) IntLockFreeType(); @@ -3219,6 +3277,7 @@ get_glyph_index_symbol(FT_Face ft_face, UINT glyph) { FT_UInt ret; + DPRINT("\n"); if (glyph < 0x100) glyph += 0xf000; /* there are a number of old pre-Unicode "broken" TTFs, which do have symbols at U+00XX instead of U+f0XX */ @@ -3233,6 +3292,7 @@ get_glyph_index(FT_Face ft_face, UINT glyph) { FT_UInt ret; + DPRINT("\n"); if (face_has_symbol_charmap(ft_face)) { ret = get_glyph_index_symbol(ft_face, glyph); @@ -3247,6 +3307,7 @@ static inline FT_UInt FASTCALL get_glyph_index_flagged(FT_Face face, FT_ULong code, DWORD indexed_flag, DWORD flags) { FT_UInt glyph_index; + DPRINT("\n"); if (flags & indexed_flag) { glyph_index = code; @@ -3757,6 +3818,7 @@ TextIntGetTextExtentPoint(PDC dc, BOOL EmuBold, EmuItalic; LONG ascender, descender; + DPRINT("\n"); FontGDI = ObjToGDI(TextObj->Font, FONT); face = FontGDI->SharedFace->Face; @@ -3891,6 +3953,7 @@ ftGdiGetTextCharsetInfo( DWORD cp, fs0; USHORT usACP, usOEM; + DPRINT("\n"); pdcattr = Dc->pdcattr; hFont = pdcattr->hlfntNew; TextObj = RealizeFontInit(hFont); @@ -3991,6 +4054,7 @@ ftGetFontUnicodeRanges(PFONTGDI Font, PGLYPHSET glyphset) DWORD num_ranges = 0; FT_Face face = Font->SharedFace->Face; + DPRINT("\n"); if (face->charmap->encoding == FT_ENCODING_UNICODE) { FT_UInt glyph_code = 0; @@ -4069,6 +4133,7 @@ ftGdiGetTextMetricsW( NTSTATUS Status = STATUS_SUCCESS; LOGFONTW *plf; + DPRINT("\n"); if (!ptmwi) { EngSetLastError(STATUS_INVALID_PARAMETER); @@ -4159,6 +4224,7 @@ ftGdiGetFontData( DWORD Result = GDI_ERROR; FT_Face Face = FontGdi->SharedFace->Face; + DPRINT("\n"); IntLockFreeType(); if (FT_IS_SFNT(Face)) @@ -4201,6 +4267,7 @@ GetFontPenalty(const LOGFONTW * LogFont, const TEXTMETRICW * TM = &Otm->otmTextMetrics; WCHAR* ActualNameW; + DPRINT("\n"); ASSERT(Otm); ASSERT(LogFont); @@ -4582,6 +4649,7 @@ FindBestFontFromList(FONTOBJ **FontObj, ULONG *MatchPenalty, UINT OtmSize, OldOtmSize = 0; FT_Face Face; + DPRINT("\n"); ASSERT(FontObj); ASSERT(MatchPenalty); ASSERT(LogFont); @@ -4644,6 +4712,7 @@ IntFontType(PFONTGDI Font) FT_ULong tmp_size = 0; FT_Face Face = Font->SharedFace->Face; + DPRINT("\n"); if (FT_HAS_MULTIPLE_MASTERS(Face)) Font->FontObj.flFontType |= FO_MULTIPLEMASTER; if (FT_HAS_VERTICAL(Face)) @@ -4679,6 +4748,7 @@ TextIntRealizeFont(HFONT FontHandle, PTEXTOBJ pTextObj) LOGFONTW SubstitutedLogFont; FT_Face Face; + DPRINT("\n"); if (!pTextObj) { TextObj = TEXTOBJ_LockText(FontHandle); @@ -4794,6 +4864,7 @@ IntGetFullFileName( IO_STATUS_BLOCK IoStatusBlock; ULONG Desired; + DPRINT("\n"); InitializeObjectAttributes(&ObjectAttributes, FileName, OBJ_CASE_INSENSITIVE | OBJ_KERNEL_HANDLE, @@ -4833,6 +4904,7 @@ EqualFamilyInfo(const FONTFAMILYINFO *pInfo1, const FONTFAMILYINFO *pInfo2) const LOGFONTW *plf1 = &pLog1->elfLogFont; const LOGFONTW *plf2 = &pLog2->elfLogFont; + DPRINT("\n"); if (_wcsicmp(plf1->lfFaceName, plf2->lfFaceName) != 0) { return FALSE; @@ -4849,6 +4921,7 @@ EqualFamilyInfo(const FONTFAMILYINFO *pInfo1, const FONTFAMILYINFO *pInfo2) static VOID IntAddNameFromFamInfo(LPWSTR psz, FONTFAMILYINFO *FamInfo) { + DPRINT("\n"); wcscat(psz, FamInfo->EnumLogFontEx.elfLogFont.lfFaceName); if (FamInfo->EnumLogFontEx.elfStyle[0] && _wcsicmp(FamInfo->EnumLogFontEx.elfStyle, L"Regular") != 0) @@ -5136,6 +5209,7 @@ BOOL FASTCALL ftGdiRealizationInfo(PFONTGDI Font, PREALIZATION_INFO Info) { + DPRINT("\n"); if (FT_HAS_FIXED_SIZES(Font->SharedFace->Face)) Info->iTechnology = RI_TECH_BITMAP; else @@ -5161,6 +5235,7 @@ ftGdiGetKerningPairs( PFONTGDI Font, INT i = 0; FT_Face face = Font->SharedFace->Face; + DPRINT("\n"); if (FT_HAS_KERNING(face) && face->charmap->encoding == FT_ENCODING_UNICODE) { FT_UInt previous_index = 0, glyph_index = 0; @@ -5214,6 +5289,7 @@ NtGdiGetFontFamilyInfo(HDC Dc, DWORD Count; PPROCESSINFO Win32Process; + DPRINT("\n"); /* Make a safe copy */ Status = MmCopyFromCaller(&LogFont, UnsafeLogFont, sizeof(LOGFONTW)); if (! NT_SUCCESS(Status)) @@ -5284,6 +5360,7 @@ ScaleLong(LONG lValue, PFLOATOBJ pef) { FLOATOBJ efTemp; + DPRINT("\n"); /* Check if we have scaling different from 1 */ if (!FLOATOBJ_Equal(pef, (PFLOATOBJ)&gef1)) { @@ -5349,6 +5426,7 @@ GreExtTextOutW( int thickness; BOOL bResult; + DPRINT("\n"); /* Check if String is valid */ if ((Count > 0xFFFF) || (Count > 0 && String == NULL)) { @@ -6066,6 +6144,7 @@ NtGdiExtTextOutW( LPINT SafeDx = NULL; ULONG BufSize, StringSize, DxSize = 0; + DPRINT("\n"); /* Check if String is valid */ if ((Count > 0xFFFF) || (Count > 0 && UnsafeString == NULL)) { @@ -6194,6 +6273,7 @@ NtGdiGetCharABCWidthsW( PWCHAR Safepwch = NULL; LOGFONTW *plf; + DPRINT("\n"); if (!Buffer) { EngSetLastError(ERROR_INVALID_PARAMETER); @@ -6398,6 +6478,7 @@ NtGdiGetCharWidthW( PWCHAR Safepwc = NULL; LOGFONTW *plf; + DPRINT("\n"); if (UnSafepwc) { UINT pwcSize = Count * sizeof(WCHAR); @@ -6562,6 +6643,7 @@ NtGdiGetGlyphIndicesW( LPCWSTR UnSafepwc = pwc; LPWORD UnSafepgi = pgi; + DPRINT("\n"); /* Check for integer overflow */ if (cwc & 0x80000000) // (INT_MAX + 1) == INT_MIN return GDI_ERROR; diff --git a/win32ss/gdi/ntgdi/text.c b/win32ss/gdi/ntgdi/text.c index ec0503fa46..c4c9a611b2 100644 --- a/win32ss/gdi/ntgdi/text.c +++ b/win32ss/gdi/ntgdi/text.c @@ -10,7 +10,7 @@ #include -#define NDEBUG +//#define NDEBUG #include /** Functions *****************************************************************/ @@ -23,6 +23,7 @@ GreTextOutW( LPCWSTR lpString, int cchString) { + DPRINT("\n"); return GreExtTextOutW(hdc, nXStart, nYStart, 0, NULL, lpString, cchString, NULL, 0); } @@ -45,6 +46,7 @@ GreGetTextExtentW( BOOL Result; PTEXTOBJ TextObj; + DPRINT("\n"); if (!cwc) { psize->cx = 0; @@ -105,6 +107,7 @@ GreGetTextExtentExW( BOOL Result; PTEXTOBJ TextObj; + DPRINT("\n"); if ( (!String && Count ) || !pSize ) { EngSetLastError(ERROR_INVALID_PARAMETER); @@ -153,6 +156,7 @@ GreGetTextMetricsW( _Out_ LPTEXTMETRICW lptm) { TMW_INTERNAL tmwi; + DPRINT("\n"); if (!ftGdiGetTextMetricsW(hdc, &tmwi)) return FALSE; *lptm = tmwi.TextMetric; return TRUE; @@ -165,6 +169,7 @@ NtGdiGetCharSet(HDC hDC) PDC Dc; PDC_ATTR pdcattr; DWORD cscp; + DPRINT("\n"); // If here, update everything! Dc = DC_LockDc(hDC); if (!Dc) @@ -189,6 +194,7 @@ NtGdiGetRasterizerCaps( NTSTATUS Status = STATUS_SUCCESS; RASTERIZER_STATUS rsSafe; + DPRINT("\n"); if (praststat && cjBytes) { if ( cjBytes >= sizeof(RASTERIZER_STATUS) ) cjBytes = sizeof(RASTERIZER_STATUS); @@ -232,6 +238,7 @@ NtGdiGetTextCharsetInfo( PFONTSIGNATURE pfsSafe = &fsSafe; NTSTATUS Status = STATUS_SUCCESS; + DPRINT("\n"); Dc = DC_LockDc(hdc); if (!Dc) { @@ -301,6 +308,7 @@ NtGdiGetTextExtentExW( LPINT Dx; PTEXTOBJ TextObj; + DPRINT("\n"); if ((LONG)Count < 0) { EngSetLastError(ERROR_INVALID_PARAMETER); @@ -452,6 +460,7 @@ NtGdiGetTextExtent(HDC hdc, LPSIZE psize, UINT flOpts) { + DPRINT("\n"); return NtGdiGetTextExtentExW(hdc, lpwsz, cwc, 0, NULL, NULL, psize, flOpts); } @@ -464,6 +473,7 @@ NtGdiSetTextJustification(HDC hDC, PDC pDc; PDC_ATTR pdcattr; + DPRINT("\n"); pDc = DC_LockDc(hDC); if (!pDc) { @@ -501,6 +511,7 @@ NtGdiGetTextFaceW( /* FIXME: Handle bAliasName */ + DPRINT("\n"); Dc = DC_LockDc(hDC); if (Dc == NULL) { @@ -551,6 +562,7 @@ NtGdiGetTextMetricsW( { TMW_INTERNAL Tmwi; + DPRINT("\n"); if ( cj <= sizeof(TMW_INTERNAL) ) { if (ftGdiGetTextMetricsW(hDC, &Tmwi))