… | |
… | |
60 | #if ENCODING_JP || ENCODING_JP_EXT |
60 | #if ENCODING_JP || ENCODING_JP_EXT |
61 | # if XFT |
61 | # if XFT |
62 | // prefer xft for complex scripts |
62 | // prefer xft for complex scripts |
63 | { CS_UNICODE, "xft:Kochi Gothic:antialias=false" }, |
63 | { CS_UNICODE, "xft:Kochi Gothic:antialias=false" }, |
64 | # endif |
64 | # endif |
|
|
65 | { CS_JIS0201_1976_0, "-*-mincho-*-r-*--*-*-*-*-c-*-jisx0201*-0" }, |
|
|
66 | { CS_JIS0208_1990_0, "-*-mincho-*-r-*--*-*-*-*-c-*-jisx0208*-0" }, |
|
|
67 | { CS_JIS0212_1990_0, "-*-mincho-*-r-*--*-*-*-*-c-*-jisx0212*-0" }, |
65 | { CS_JIS0201_1976_0, "-*-*-*-r-*--*-*-*-*-c-*-jisx0201*-0" }, |
68 | { CS_JIS0201_1976_0, "-*-*-*-r-*--*-*-*-*-c-*-jisx0201*-0" }, |
66 | { CS_JIS0208_1990_0, "-*-*-*-r-*--*-*-*-*-c-*-jisx0208*-0" }, |
69 | { CS_JIS0208_1990_0, "-*-*-*-r-*--*-*-*-*-c-*-jisx0208*-0" }, |
67 | { CS_JIS0212_1990_0, "-*-*-*-r-*--*-*-*-*-c-*-jisx0212*-0" }, |
70 | { CS_JIS0212_1990_0, "-*-*-*-r-*--*-*-*-*-c-*-jisx0212*-0" }, |
68 | #endif |
71 | #endif |
69 | |
72 | |
… | |
… | |
1159 | |
1162 | |
1160 | return true; |
1163 | return true; |
1161 | } |
1164 | } |
1162 | |
1165 | |
1163 | int |
1166 | int |
1164 | rxvt_fontset::find_font (unicode_t unicode) |
1167 | rxvt_fontset::find_font (unicode_t unicode, bool bold) |
1165 | { |
1168 | { |
1166 | for (unsigned int i = !!(0x20 <= unicode && unicode <= 0x7f); // skip pseudo-font for ascii |
1169 | for (unsigned int i = !!(0x20 <= unicode && unicode <= 0x7f); // skip pseudo-font for ascii |
1167 | i < fonts.size (); |
1170 | i < fonts.size (); |
1168 | i++) |
1171 | i++) |
1169 | { |
1172 | { |
… | |
… | |
1176 | |
1179 | |
1177 | if (!realize_font (i)) |
1180 | if (!realize_font (i)) |
1178 | goto next_font; |
1181 | goto next_font; |
1179 | } |
1182 | } |
1180 | |
1183 | |
|
|
1184 | if (f->cs == CS_UNKNOWN) |
|
|
1185 | goto next_font; |
|
|
1186 | |
|
|
1187 | if (bold && f->properties ().weight < rxvt_fontprop::bold) |
|
|
1188 | goto next_font; |
|
|
1189 | |
1181 | if (f->cs != CS_UNKNOWN && f->has_codepoint (unicode)) |
1190 | if (f->has_codepoint (unicode)) |
1182 | return i; |
1191 | return i; |
1183 | |
1192 | |
1184 | next_font: |
1193 | next_font: |
1185 | if (i == fonts.size () - 1 && fallback->name) |
1194 | if (i == fonts.size () - 1 && fallback->name) |
1186 | { |
1195 | { |
… | |
… | |
1188 | fallback++; |
1197 | fallback++; |
1189 | i = 0; |
1198 | i = 0; |
1190 | } |
1199 | } |
1191 | } |
1200 | } |
1192 | |
1201 | |
|
|
1202 | // if no bold font found, use a regular one |
|
|
1203 | if (bold) |
|
|
1204 | return find_font (unicode); |
|
|
1205 | |
1193 | return 0; /* we must return SOME font */ |
1206 | return 0; /* we must return SOME font */ |
1194 | } |
1207 | } |
1195 | |
1208 | |
1196 | |
1209 | |
1197 | |
1210 | |