mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
dwtm/WmResource.c: Stop printing garbage when XmeRenderTableGetDefaultFont() fails.
This commit is contained in:
parent
dc7807b13b
commit
a7ec1c6182
1 changed files with 11 additions and 4 deletions
|
@ -4482,11 +4482,18 @@ MakeAppearanceResources (WmScreenData *pSD, AppearanceData *pAData, Boolean make
|
||||||
|
|
||||||
if (! XmeRenderTableGetDefaultFont(pAData->fontList, &(pAData->font)))
|
if (! XmeRenderTableGetDefaultFont(pAData->fontList, &(pAData->font)))
|
||||||
{
|
{
|
||||||
sprintf((char *)wmGD.tmpBuffer, ((char *)GETMESSAGE(62, 23, "failed to load font: %.100s\0")), (char*) pAData->fontList);
|
#if 0
|
||||||
Warning((char *)wmGD.tmpBuffer);
|
/* This always prints garbage on failure, which seems to
|
||||||
|
* always happen at least 1-3 times on startup.
|
||||||
|
*/
|
||||||
|
sprintf((char *)wmGD.tmpBuffer,
|
||||||
|
((char *)GETMESSAGE(62, 23, "failed to load font: %.100s\0")), (char*) pAData->fontList);
|
||||||
|
#endif
|
||||||
|
Warning("XmeRenderTableGetDefaultFont() failed, trying a fixed font");
|
||||||
|
|
||||||
#if defined(CSRG_BASED) || defined(__linux__)
|
#if defined(CSRG_BASED) || defined(__linux__)
|
||||||
/* HACK to try get _some_ font anyway (fontList seems to end up as an empty list on
|
/* HACK to try get _some_ font anyway (fontList seems to end
|
||||||
* some modern systems; investigate) */
|
* up as an empty list on some modern systems; investigate) */
|
||||||
pAData->font = XLoadQueryFont(wmGD.display, "fixed");
|
pAData->font = XLoadQueryFont(wmGD.display, "fixed");
|
||||||
if (pAData->font == NULL)
|
if (pAData->font == NULL)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue