--- rxvt-unicode/src/defaultfont.C 2004/06/21 19:09:44 1.53 +++ rxvt-unicode/src/defaultfont.C 2004/07/26 14:57:12 1.55 @@ -62,6 +62,9 @@ // prefer xft for complex scripts { CS_UNICODE, "xft:Kochi Gothic:antialias=false" }, # endif + { CS_JIS0201_1976_0, "-*-mincho-*-r-*--*-*-*-*-c-*-jisx0201*-0" }, + { CS_JIS0208_1990_0, "-*-mincho-*-r-*--*-*-*-*-c-*-jisx0208*-0" }, + { CS_JIS0212_1990_0, "-*-mincho-*-r-*--*-*-*-*-c-*-jisx0212*-0" }, { CS_JIS0201_1976_0, "-*-*-*-r-*--*-*-*-*-c-*-jisx0201*-0" }, { CS_JIS0208_1990_0, "-*-*-*-r-*--*-*-*-*-c-*-jisx0208*-0" }, { CS_JIS0212_1990_0, "-*-*-*-r-*--*-*-*-*-c-*-jisx0212*-0" }, @@ -1161,7 +1164,7 @@ } int -rxvt_fontset::find_font (unicode_t unicode) +rxvt_fontset::find_font (unicode_t unicode, bool bold) { for (unsigned int i = !!(0x20 <= unicode && unicode <= 0x7f); // skip pseudo-font for ascii i < fonts.size (); @@ -1178,7 +1181,13 @@ goto next_font; } - if (f->cs != CS_UNKNOWN && f->has_codepoint (unicode)) + if (f->cs == CS_UNKNOWN) + goto next_font; + + if (bold && f->properties ().weight < rxvt_fontprop::bold) + goto next_font; + + if (f->has_codepoint (unicode)) return i; next_font: @@ -1190,6 +1199,10 @@ } } + // if no bold font found, use a regular one + if (bold) + return find_font (unicode); + return 0; /* we must return SOME font */ }