… | |
… | |
517 | } |
517 | } |
518 | |
518 | |
519 | bool load (const rxvt_fontprop &prop, bool force_prop) |
519 | bool load (const rxvt_fontprop &prop, bool force_prop) |
520 | { |
520 | { |
521 | width = 1; height = 1; |
521 | width = 1; height = 1; |
522 | ascent = 1; descent = 0; |
522 | ascent = 1; |
|
|
523 | descent = (*fs)[2]->descent; |
523 | |
524 | |
524 | set_name (strdup ("built-in rendition overflow font")); |
525 | set_name (strdup ("built-in rendition overflow font")); |
525 | |
526 | |
526 | return true; |
527 | return true; |
527 | } |
528 | } |
… | |
… | |
1263 | break; |
1264 | break; |
1264 | } |
1265 | } |
1265 | |
1266 | |
1266 | FT_Face face = XftLockFace (f); |
1267 | FT_Face face = XftLockFace (f); |
1267 | |
1268 | |
|
|
1269 | // fuck me plenty: XftLockFace can actually return 0. try not to crash. |
|
|
1270 | // we also assume blindly that if the first lock succeeds, then subsequent |
|
|
1271 | // locks will also succeed. |
|
|
1272 | if (!face) |
|
|
1273 | { |
|
|
1274 | XftFontClose (disp, f); |
|
|
1275 | success = false; |
|
|
1276 | break; |
|
|
1277 | } |
|
|
1278 | |
1268 | ascent = (face->size->metrics.ascender + 63) >> 6; |
1279 | ascent = (face->size->metrics.ascender + 63) >> 6; |
1269 | descent = (-face->size->metrics.descender + 63) >> 6; |
1280 | descent = (-face->size->metrics.descender + 63) >> 6; |
1270 | height = max (ascent + descent, (face->size->metrics.height + 63) >> 6); |
1281 | height = max (ascent + descent, (face->size->metrics.height + 63) >> 6); |
1271 | width = 0; |
1282 | width = 0; |
1272 | |
1283 | |