mirror of
https://github.com/reactos/reactos.git
synced 2025-04-20 20:36:35 +00:00
[FONT][WIN32SS] Add dumping functions for debugging
This commit is contained in:
parent
6b67ef6e10
commit
2ccfe267a0
1 changed files with 122 additions and 0 deletions
|
@ -335,6 +335,124 @@ SharedFace_Release(PSHARED_FACE Ptr)
|
||||||
IntUnLockFreeType();
|
IntUnLockFreeType();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if DBG
|
||||||
|
VOID DumpFontGDI(PFONTGDI FontGDI)
|
||||||
|
{
|
||||||
|
const char *family_name;
|
||||||
|
const char *style_name;
|
||||||
|
FT_Face Face;
|
||||||
|
|
||||||
|
if (!FontGDI)
|
||||||
|
{
|
||||||
|
DPRINT("FontGDI NULL\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Face = (FontGDI->SharedFace ? FontGDI->SharedFace->Face : NULL);
|
||||||
|
if (Face)
|
||||||
|
{
|
||||||
|
family_name = Face->family_name;
|
||||||
|
if (!family_name)
|
||||||
|
family_name = "<NULL>";
|
||||||
|
|
||||||
|
style_name = Face->style_name;
|
||||||
|
if (!style_name)
|
||||||
|
style_name = "<NULL>";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
family_name = "<invalid>";
|
||||||
|
style_name = "<invalid>";
|
||||||
|
}
|
||||||
|
|
||||||
|
DPRINT("family_name '%s', style_name '%s', FontGDI %p, FontObj %p, iUnique %lu, SharedFace %p, Face %p, CharSet %u, Filename '%S'\n",
|
||||||
|
family_name,
|
||||||
|
style_name,
|
||||||
|
FontGDI,
|
||||||
|
FontGDI->FontObj,
|
||||||
|
FontGDI->iUnique,
|
||||||
|
FontGDI->SharedFace,
|
||||||
|
Face,
|
||||||
|
FontGDI->CharSet,
|
||||||
|
FontGDI->Filename);
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID DumpFontList(PLIST_ENTRY Head)
|
||||||
|
{
|
||||||
|
PLIST_ENTRY Entry;
|
||||||
|
PFONT_ENTRY CurrentEntry;
|
||||||
|
PFONTGDI FontGDI;
|
||||||
|
|
||||||
|
DPRINT("## DumpFontList(%p)\n", Head);
|
||||||
|
|
||||||
|
for (Entry = Head->Flink; Entry != Head; Entry = Entry->Flink)
|
||||||
|
{
|
||||||
|
CurrentEntry = CONTAINING_RECORD(Entry, FONT_ENTRY, ListEntry);
|
||||||
|
FontGDI = CurrentEntry->Font;
|
||||||
|
|
||||||
|
DumpFontGDI(FontGDI);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID DumpFontSubstEntry(PFONTSUBST_ENTRY pSubstEntry)
|
||||||
|
{
|
||||||
|
DPRINT("%wZ,%u -> %wZ,%u\n",
|
||||||
|
&pSubstEntry->FontNames[FONTSUBST_FROM],
|
||||||
|
pSubstEntry->CharSets[FONTSUBST_FROM],
|
||||||
|
&pSubstEntry->FontNames[FONTSUBST_TO],
|
||||||
|
pSubstEntry->CharSets[FONTSUBST_TO]);
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID DumpFontSubstList(VOID)
|
||||||
|
{
|
||||||
|
PLIST_ENTRY pHead = &g_FontSubstListHead;
|
||||||
|
PLIST_ENTRY pListEntry;
|
||||||
|
PFONTSUBST_ENTRY pSubstEntry;
|
||||||
|
|
||||||
|
DPRINT("## DumpFontSubstList\n");
|
||||||
|
|
||||||
|
for (pListEntry = pHead->Flink;
|
||||||
|
pListEntry != pHead;
|
||||||
|
pListEntry = pListEntry->Flink)
|
||||||
|
{
|
||||||
|
pSubstEntry =
|
||||||
|
(PFONTSUBST_ENTRY)CONTAINING_RECORD(pListEntry, FONT_ENTRY, ListEntry);
|
||||||
|
|
||||||
|
DumpFontSubstEntry(pSubstEntry);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID DumpPrivateFontList(BOOL bDoLock)
|
||||||
|
{
|
||||||
|
PPROCESSINFO Win32Process = PsGetCurrentProcessWin32Process();
|
||||||
|
|
||||||
|
if (bDoLock)
|
||||||
|
IntLockProcessPrivateFonts(Win32Process);
|
||||||
|
|
||||||
|
DumpFontList(&Win32Process->PrivateFontListHead);
|
||||||
|
|
||||||
|
if (bDoLock)
|
||||||
|
IntUnLockProcessPrivateFonts(Win32Process);
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID DumpGlobalFontList(BOOL bDoLock)
|
||||||
|
{
|
||||||
|
if (bDoLock)
|
||||||
|
IntLockGlobalFonts();
|
||||||
|
|
||||||
|
DumpFontList(&g_FontListHead);
|
||||||
|
|
||||||
|
if (bDoLock)
|
||||||
|
IntUnLockGlobalFonts();
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID DumpFontInfo(BOOL bDoLock)
|
||||||
|
{
|
||||||
|
DumpGlobalFontList(bDoLock);
|
||||||
|
DumpPrivateFontList(bDoLock);
|
||||||
|
DumpFontSubstList();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IntLoadFontSubstList --- loads the list of font substitutes
|
* IntLoadFontSubstList --- loads the list of font substitutes
|
||||||
|
@ -522,6 +640,10 @@ InitFontSupport(VOID)
|
||||||
IntLoadSystemFonts();
|
IntLoadSystemFonts();
|
||||||
IntLoadFontSubstList(&g_FontSubstListHead);
|
IntLoadFontSubstList(&g_FontSubstListHead);
|
||||||
|
|
||||||
|
#if DBG
|
||||||
|
DumpFontInfo(TRUE);
|
||||||
|
#endif
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue