rem: if (WMIsAntialiasingEnabled(scr->wmscreen)) { font = WMBoldSystemFontOfSize(scr->wmscreen, 24); } else { font = WMCreateFont(scr->wmscreen, "-*-utopia-*-r-*-*-25-*"); font = font ? font : WMBoldSystemFontOfSize(scr->wmscreen, 24); }
add: name = "Lucida Sans,Comic Sans MS,URW Gothic L,Trebuchet MS,sans:bold:pixelsize=26"; font = WMCreateFont(scr->wmscreen, name);
context: wShowInfoPanel(WScreen *scr){    InfoPanel *panel;    WMPixmap *logo;    WMSize size;    WMFont *font;    char *strbuf = NULL;    char buffer[256];    Window parent;    WWindow *wwin;    char **strl;    int i, width, sepWidth;    char *visuals[] = {        "StaticGray",        "GrayScale",        "StaticColor",        "PseudoColor",        "TrueColor",        "DirectColor"    };    if (thePanel) {        if (thePanel->scr == scr) {            wRaiseFrame(thePanel->wwin->frame->core);            wSetFocusTo(scr, thePanel->wwin);        }        return;    }    panel = wmalloc(sizeof(InfoPanel));    memset(panel, 0, sizeof(InfoPanel));    panel->scr = scr;    panel->win = WMCreateWindow(scr->wmscreen, "info");    WMResizeWidget(panel->win, 390, 230);    logo = WMCreateApplicationIconBlendedPixmap(scr->wmscreen, (RColor*)NULL);    if (!logo) {        logo = WMRetainPixmap(WMGetApplicationIconPixmap(scr->wmscreen));    }    if (logo) {        size = WMGetPixmapSize(logo);        panel->logoL = WMCreateLabel(panel->win);        WMResizeWidget(panel->logoL, 64, 64);        WMMoveWidget(panel->logoL, 30, 20);        WMSetLabelImagePosition(panel->logoL, WIPImageOnly);        WMSetLabelImage(panel->logoL, logo);#ifdef SILLYNESS        WMCreateEventHandler(WMWidgetView(panel->logoL), ButtonPressMask,                             handleLogoPush, panel);#endif        WMReleasePixmap(logo);    }    sepWidth = 3;    panel->name1L = WMCreateLabel(panel->win);    WMResizeWidget(panel->name1L, 240, 30 - sepWidth);    WMMoveWidget(panel->name1L, 100, 30);    if (WMIsAntialiasingEnabled(scr->wmscreen)) {        font = WMBoldSystemFontOfSize(scr->wmscreen, 24);    } else {        font = WMCreateFont(scr->wmscreen, "-*-utopia-*-r-*-*-25-*");        font = font ? font : WMBoldSystemFontOfSize(scr->wmscreen, 24);    }    strbuf = "Window Maker";    if (font) {        width = WMWidthOfString(font, strbuf, strlen(strbuf));        WMSetLabelFont(panel->name1L, font);        WMReleaseFont(font);    }    WMSetLabelTextAlignment(panel->name1L, WACenter);    WMSetLabelText(panel->name1L, strbuf);    panel->lineF = WMCreateFrame(panel->win);    WMResizeWidget(panel->lineF, width, sepWidth);    WMMoveWidget(panel->lineF, 100+(240-width)/2, 60 - sepWidth);    WMSetFrameRelief(panel->lineF, WRSimple);    WMSetWidgetBackgroundColor(panel->lineF, scr->black);    panel->name2L = WMCreateLabel(panel->win);    WMResizeWidget(panel->name2L, 240, 24);    WMMoveWidget(panel->name2L, 100, 60);    font = WMBoldSystemFontOfSize(scr->wmscreen, 18);    if (font) {        WMSetLabelFont(panel->name2L, font);        WMReleaseFont(font);        font = NULL;    }    WMSetLabelTextAlignment(panel->name2L, WACenter);    WMSetLabelText(panel->name2L, _("Window Manager for X"));    snprintf(buffer, sizeof(buffer), _("Version %s"), VERSION);    panel->versionL = WMCreateLabel(panel->win);    WMResizeWidget(panel->versionL, 310, 16);    WMMoveWidget(panel->versionL, 30, 95);    WMSetLabelTextAlignment(panel->versionL, WARight);    WMSetLabelText(panel->versionL, buffer);    WMSetLabelWraps(panel->versionL, False);    panel->copyrL = WMCreateLabel(panel->win);    WMResizeWidget(panel->copyrL, 360, 40);    WMMoveWidget(panel->copyrL, 15, 185);    WMSetLabelTextAlignment(panel->copyrL, WALeft);    WMSetLabelText(panel->copyrL, COPYRIGHT_TEXT);    font = WMSystemFontOfSize(scr->wmscreen, 11);    if (font) {        WMSetLabelFont(panel->copyrL, font);        WMReleaseFont(font);        font = NULL;    }    strbuf = NULL;    snprintf(buffer, sizeof(buffer), _("Using visual 0x%x: %s %ibpp "),             (unsigned)scr->w_visual->visualid,             visuals[scr->w_visual->class], scr->w_depth);    strbuf = wstrappend(strbuf, buffer);    switch (scr->w_depth) {    case 15:        strbuf = wstrappend(strbuf, _("(32 thousand colors)\n"));        break;    case 16:        strbuf = wstrappend(strbuf, _("(64 thousand colors)\n"));        break;    case 24:    case 32:        strbuf = wstrappend(strbuf, _("(16 million colors)\n"));        break;    default:        snprintf(buffer, sizeof(buffer), _("(%d colors)\n"), 1<<scr->w_depth);        strbuf = wstrappend(strbuf, buffer);        break;    }#if defined(HAVE_MALLOC_H) && defined(HAVE_MALLINFO)    {        struct mallinfo ma = mallinfo();        snprintf(buffer, sizeof(buffer),                 _("Total allocated memory: %i kB. Total memory in use: %i kB.\n"),                 (ma.arena+ma.hblkhd)/1024, (ma.uordblks+ma.hblkhd)/1024);        strbuf = wstrappend(strbuf, buffer);    }#endif    strbuf = wstrappend(strbuf, _("Supported image formats: "));    strl = RSupportedFileFormats();    for (i=0; strl[i]!=NULL; i++) {        strbuf = wstrappend(strbuf, strl[i]);        strbuf = wstrappend(strbuf, " ");    }    strbuf = wstrappend(strbuf, _("\nAdditional support for: "));    {        char *list[9];        char buf[80];        int j = 0;#ifdef NETWM_HINTS        list[j++] = "WMSPEC";#endif#ifdef MWM_HINTS        list[j++] = "MWM";#endif        buf[0] = 0;        for (i = 0; i < j; i++) {            if (i > 0) {                if (i == j - 1)                    strcat(buf, _(" and "));                else                    strcat(buf, ", ");            }            strcat(buf, list[i]);        }        strbuf = wstrappend(strbuf, buf);    }    if (wPreferences.no_sound) {        strbuf = wstrappend(strbuf, _("\nSound disabled"));    } else {        strbuf = wstrappend(strbuf, _("\nSound enabled"));    }    strbuf = wstrappend(strbuf, _("; Antialiased text"));#ifdef VIRTUAL_DESKTOP    strbuf = wstrappend(strbuf, _(", VirtualDesktop"));#endif#ifdef XINERAMA    strbuf = wstrappend(strbuf, _("\n"));#ifdef SOLARIS_XINERAMA    strbuf = wstrappend(strbuf, _("Solaris "));#endif    strbuf = wstrappend(strbuf, _("Xinerama: "));    {        char tmp[128];        snprintf(tmp, sizeof(tmp)-1, "%d heads found.", scr->xine_info.count);        strbuf = wstrappend(strbuf, tmp);    }#endif    panel->infoL = WMCreateLabel(panel->win);    WMResizeWidget(panel->infoL, 350, 75);    WMMoveWidget(panel->infoL, 15, 115);    WMSetLabelText(panel->infoL, strbuf);    font = WMSystemFontOfSize(scr->wmscreen, 11);    if (font) {        WMSetLabelFont(panel->infoL, font);        WMReleaseFont(font);        font = NULL;    }    wfree(strbuf);    WMRealizeWidget(panel->win);    WMMapSubwidgets(panel->win);    parent = XCreateSimpleWindow(dpy, scr->root_win, 0, 0, 382, 230, 0, 0, 0);    XReparentWindow(dpy, WMWidgetXID(panel->win), parent, 0, 0);    WMMapWidget(panel->win);    {        WMPoint center = getCenter(scr, 382, 230);        wwin = wManageInternalWindow(scr, parent, None, _("Info"),                                     center.x, center.y,                                     382, 230);    }    WSETUFLAG(wwin, no_closable, 0);    WSETUFLAG(wwin, no_close_button, 0);#ifdef XKB_BUTTON_HINT    wFrameWindowHideButton(wwin->frame, WFF_LANGUAGE_BUTTON);#endif    wWindowUpdateButtonImages(wwin);    wFrameWindowShowButton(wwin->frame, WFF_RIGHT_BUTTON);    wwin->frame->on_click_right = destroyInfoPanel;    wWindowMap(wwin);    panel->wwin = wwin;    thePanel = panel;#ifdef SILLYNESS    if (InitXThing(panel->scr)) {        panel->timer = WMAddTimerHandler(100, logoPushCallback, panel);        panel->cycle = 0;        panel->x = 1;        panel->str = _("Merry Christmas!");        panel->oldPix = WMRetainPixmap(WMGetLabelImage(panel->logoL));    }#endif}