More fine-grained NS_FONT_DEBUG environment variables to distinguish between Xlib, Xprint and GTK. Bug 206017, author=Roland.Mainz@informatik.med.uni-giessen.de, r=rbs, sr=dmose, a=asa.

This commit is contained in:
smontagu%netscape.com 2003-05-20 22:50:51 +00:00
Родитель b7aa577af9
Коммит 5d0917707c
2 изменённых файлов: 28 добавлений и 3 удалений

Просмотреть файл

@ -850,11 +850,18 @@ static nsresult
InitGlobals(nsIDeviceContext *aDevice)
{
#ifdef NS_FONT_DEBUG
char* debug = PR_GetEnv("NS_FONT_DEBUG");
/* First check gfx/src/gtk/-specific env var "NS_FONT_DEBUG_GTK",
* then the more general "NS_FONT_DEBUG" if "NS_FONT_DEBUG_GTK"
* is not present */
const char *debug = PR_GetEnv("NS_FONT_DEBUG_GTK");
if (!debug) {
debug = PR_GetEnv("NS_FONT_DEBUG");
}
if (debug) {
PR_sscanf(debug, "%lX", &gFontDebug);
}
#endif
#endif /* NS_FONT_DEBUG */
NS_ENSURE_TRUE(nsnull != aDevice, NS_ERROR_NULL_POINTER);

Просмотреть файл

@ -1146,7 +1146,25 @@ nsFontMetricsXlibContext::Init(nsIDeviceContext *aDevice, PRBool aPrintermode)
PR_LOG(FontMetricsXlibLM, PR_LOG_DEBUG, ("## CopyFontCharSetMapXlib done.\n"));
#ifdef NS_FONT_DEBUG
const char* debug = PR_GetEnv("NS_FONT_DEBUG");
/* First check gfx/src/xlib/-specific env var "NS_FONT_DEBUG_XLIB" (or
* "NS_FONT_DEBUG_XPRINT" if the device is a printer),
* then the more general "NS_FONT_DEBUG" if
* "NS_FONT_DEBUG_XLIB"/"NS_FONT_DEBUG_XPRINT" is not present */
const char *debug;
#ifdef USE_XPRINT
if (mPrinterMode) {
debug = PR_GetEnv("NS_FONT_DEBUG_XPRINT");
}
else
#endif /* USE_XPRINT */
{
debug = PR_GetEnv("NS_FONT_DEBUG_XLIB");
}
if (!debug) {
debug = PR_GetEnv("NS_FONT_DEBUG");
}
if (debug) {
PR_sscanf(debug, "%lX", &gFontDebug);
}