Index: xc/programs/Xserver/Xprint/Init.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/Xprint/Init.c,v retrieving revision 1.6 diff -u -2 -0 -r1.6 Init.c --- xc/programs/Xserver/Xprint/Init.c 24 Jun 2004 06:26:27 -0000 1.6 +++ xc/programs/Xserver/Xprint/Init.c 30 Sep 2004 01:48:03 -0000 @@ -1249,45 +1249,62 @@ if(!strstr(mode, "xp-list-glyph-fonts")) return FALSE; return TRUE; } /* * XpClientIsPrintClient is called by the font code to find out if * a particular client has set a context which references a printer * which utilizes a particular font path. This function works by * calling XpContextOfClient (in Xserver/Xext/xprint.c) to determine * the context associated with the client, and then looks up the * font directory for the context. The font directory is then compared * with the directory specified in the FontPathElement which is passed in. */ Bool XpClientIsPrintClient( ClientPtr client, FontPathElementPtr fpe) { XpContextPtr pContext; + char *mode; char *modelID, *fontDir; if(!(pContext = XpContextOfClient(client))) return FALSE; + /* + * Check the page attributes, and if it's not defined there, then + * check the document attributes. + */ + mode = XpGetOneAttribute(pContext, XPPageAttr, "xp-listfonts-mode"); + if(!mode || !strlen(mode)) + { + mode = XpGetOneAttribute(pContext, XPDocAttr, "xp-listfonts-mode"); + } + + if(mode && strlen(mode)) + { + if(!strstr(mode, "xp-list-internal-printer-fonts")) + return FALSE; + } + if (!fpe) return TRUE; modelID = XpGetOneAttribute(pContext, XPPrinterAttr, "xp-model-identifier"); if(!modelID || !strlen(modelID)) return FALSE; if(!(fontDir = FindFontDir(modelID))) return FALSE; /* * The grunge here is to ignore the PATH_PREFIX at the front of the * fpe->name. */ if(fpe->name_length < PATH_PREFIX_LEN || (strlen(fontDir) != (fpe->name_length - PATH_PREFIX_LEN)) || strncmp(fontDir, fpe->name + PATH_PREFIX_LEN, fpe->name_length - PATH_PREFIX_LEN)) { xfree(fontDir);