--- rxvt-unicode/src/rxvtfont.C 2004/08/15 08:04:45 1.2 +++ rxvt-unicode/src/rxvtfont.C 2004/08/17 01:58:17 1.6 @@ -197,9 +197,9 @@ else if (color >= 0) { #if XFT - XftDrawRect (d, &r->PixColors[color].c, x, y, w, h); + XftDrawRect (d, &r->pix_colors[color].c, x, y, w, h); #else - XSetForeground (d.display->display, TGC, r->PixColors[color]); + XSetForeground (d.display->display, TGC, r->pix_colors[color]); XFillRectangle (d.display->display, d, TGC, x, y, w, h); #endif } @@ -268,7 +268,7 @@ { clear_rect (d, x, y, r->TermWin.fwidth * len, r->TermWin.fheight, bg); - XSetForeground (d.display->display, TGC, r->PixColors[fg]); + XSetForeground (d.display->display, TGC, r->pix_colors[fg]); while (len--) { @@ -733,7 +733,7 @@ int base = r->TermWin.fbase; XGCValues v; - v.foreground = r->PixColors[fg]; + v.foreground = r->pix_colors[fg]; v.font = f->fid; if (enc2b) @@ -742,7 +742,7 @@ if (bg == Color_bg && !slow) { - v.background = r->PixColors[bg]; + v.background = r->pix_colors[bg]; XChangeGC (d.display->display, TGC, GCForeground | GCBackground | GCFont, &v); XDrawImageString16 (d.display->display, d, TGC, x, y + base, xc, len); } @@ -774,7 +774,7 @@ if (bg == Color_bg && !slow) { - v.background = r->PixColors[bg]; + v.background = r->pix_colors[bg]; XChangeGC (d.display->display, TGC, GCForeground | GCBackground | GCFont, &v); XDrawImageString (d.display->display, d, TGC, x, y + base, xc, len); } @@ -966,12 +966,12 @@ { clear_rect (d, x, y, r->TermWin.fwidth * len, r->TermWin.fheight, bg); - if (!slow && width == r->TermWin.fwidth && 0) + if (0 && !slow && width == r->TermWin.fwidth) { if (sizeof (text_t) == sizeof (FcChar16)) - XftDrawString16 (d, &r->PixColors[fg].c, f, x, y + r->TermWin.fbase, (const FcChar16 *)text, len); + XftDrawString16 (d, &r->pix_colors[fg].c, f, x, y + r->TermWin.fbase, (const FcChar16 *)text, len); else - XftDrawString32 (d, &r->PixColors[fg].c, f, x, y + r->TermWin.fbase, (const FcChar32 *)text, len); + XftDrawString32 (d, &r->pix_colors[fg].c, f, x, y + r->TermWin.fbase, (const FcChar32 *)text, len); } else { @@ -987,14 +987,14 @@ if (sizeof (text_t) == sizeof (FcChar16)) { XftTextExtents16 (d.display->display, f, (const FcChar16 *)text, 1, &extents); - XftDrawString16 (d, &r->PixColors[fg].c, f, x + extents.x + (fwidth - extents.width) / 2, + XftDrawString16 (d, &r->pix_colors[fg].c, f, x + extents.x + (fwidth - extents.width) / 2, y + r->TermWin.fbase, (const FcChar16 *)text, 1); } else { XGlyphInfo extents; XftTextExtents32 (d.display->display, f, (const FcChar32 *)text, 1, &extents); - XftDrawString32 (d, &r->PixColors[fg].c, f, x + extents.x + (fwidth - extents.width) / 2, + XftDrawString32 (d, &r->pix_colors[fg].c, f, x + extents.x + (fwidth - extents.width) / 2, y + r->TermWin.fbase, (const FcChar32 *)text, 1); } } @@ -1217,12 +1217,13 @@ fonts.push_back (new_font (fallback->name, fallback->cs)); fallback++; } - else + else if (!bold) { // try to find a new font. // only xft currently supported, as there is no // way to configure this and xft is easier to hack in, // while x11 has more framework in place already. + // TODO: bold is being ignroed (obviously). #if XFT // grab the first xft font that seems suitable FcPattern *p = FcPatternCreate (); @@ -1234,7 +1235,7 @@ // a non-matching font even if a better font is available :/ FcPatternAddInteger (p, FC_PIXEL_SIZE, base_prop.height); - FcPatternAddInteger (p, FC_WEIGHT, base_prop.weight); + FcPatternAddInteger (p, FC_WEIGHT, bold ? rxvt_fontprop::bold : base_prop.weight); FcPatternAddInteger (p, FC_SLANT, base_prop.slant); FcPatternAddBool (p, FC_MINSPACE, 1); //FcPatternAddBool (p, FC_ANTIALIAS, 1);