ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/rxvtfont.C
(Generate patch)

Comparing rxvt-unicode/src/rxvtfont.C (file contents):
Revision 1.3 by root, Sun Aug 15 21:55:45 2004 UTC vs.
Revision 1.6 by root, Tue Aug 17 01:58:17 2004 UTC

964 const text_t *text, int len, 964 const text_t *text, int len,
965 int fg, int bg) 965 int fg, int bg)
966{ 966{
967 clear_rect (d, x, y, r->TermWin.fwidth * len, r->TermWin.fheight, bg); 967 clear_rect (d, x, y, r->TermWin.fwidth * len, r->TermWin.fheight, bg);
968 968
969 if (!slow && width == r->TermWin.fwidth && 0) 969 if (0 && !slow && width == r->TermWin.fwidth)
970 { 970 {
971 if (sizeof (text_t) == sizeof (FcChar16)) 971 if (sizeof (text_t) == sizeof (FcChar16))
972 XftDrawString16 (d, &r->pix_colors[fg].c, f, x, y + r->TermWin.fbase, (const FcChar16 *)text, len); 972 XftDrawString16 (d, &r->pix_colors[fg].c, f, x, y + r->TermWin.fbase, (const FcChar16 *)text, len);
973 else 973 else
974 XftDrawString32 (d, &r->pix_colors[fg].c, f, x, y + r->TermWin.fbase, (const FcChar32 *)text, len); 974 XftDrawString32 (d, &r->pix_colors[fg].c, f, x, y + r->TermWin.fbase, (const FcChar32 *)text, len);
1215 { 1215 {
1216 // search through the fallback list 1216 // search through the fallback list
1217 fonts.push_back (new_font (fallback->name, fallback->cs)); 1217 fonts.push_back (new_font (fallback->name, fallback->cs));
1218 fallback++; 1218 fallback++;
1219 } 1219 }
1220 else 1220 else if (!bold)
1221 { 1221 {
1222 // try to find a new font. 1222 // try to find a new font.
1223 // only xft currently supported, as there is no 1223 // only xft currently supported, as there is no
1224 // way to configure this and xft is easier to hack in, 1224 // way to configure this and xft is easier to hack in,
1225 // while x11 has more framework in place already. 1225 // while x11 has more framework in place already.
1226 // TODO: bold is being ignroed (obviously).
1226#if XFT 1227#if XFT
1227 // grab the first xft font that seems suitable 1228 // grab the first xft font that seems suitable
1228 FcPattern *p = FcPatternCreate (); 1229 FcPattern *p = FcPatternCreate ();
1229 1230
1230 FcCharSet *s = FcCharSetCreate (); 1231 FcCharSet *s = FcCharSetCreate ();
1232 FcPatternAddCharSet (p, FC_CHARSET, s); 1233 FcPatternAddCharSet (p, FC_CHARSET, s);
1233 // charsets don't help that much, as xft might return 1234 // charsets don't help that much, as xft might return
1234 // a non-matching font even if a better font is available :/ 1235 // a non-matching font even if a better font is available :/
1235 1236
1236 FcPatternAddInteger (p, FC_PIXEL_SIZE, base_prop.height); 1237 FcPatternAddInteger (p, FC_PIXEL_SIZE, base_prop.height);
1237 FcPatternAddInteger (p, FC_WEIGHT, base_prop.weight); 1238 FcPatternAddInteger (p, FC_WEIGHT, bold ? rxvt_fontprop::bold : base_prop.weight);
1238 FcPatternAddInteger (p, FC_SLANT, base_prop.slant); 1239 FcPatternAddInteger (p, FC_SLANT, base_prop.slant);
1239 FcPatternAddBool (p, FC_MINSPACE, 1); 1240 FcPatternAddBool (p, FC_MINSPACE, 1);
1240 //FcPatternAddBool (p, FC_ANTIALIAS, 1); 1241 //FcPatternAddBool (p, FC_ANTIALIAS, 1);
1241 1242
1242 XftResult result; 1243 XftResult result;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines