… | |
… | |
1263 | break; |
1263 | break; |
1264 | } |
1264 | } |
1265 | |
1265 | |
1266 | FT_Face face = XftLockFace (f); |
1266 | FT_Face face = XftLockFace (f); |
1267 | |
1267 | |
|
|
1268 | // fuck me plenty: XftLockFace can actually return 0. try not to crash. |
|
|
1269 | // we also assume blindly that if the first lock succeeeds, then subsequent |
|
|
1270 | // locks will also succeed. |
|
|
1271 | if (!face) |
|
|
1272 | { |
|
|
1273 | XftFontClose (disp, f); |
|
|
1274 | success = false; |
|
|
1275 | break; |
|
|
1276 | } |
|
|
1277 | |
1268 | ascent = (face->size->metrics.ascender + 63) >> 6; |
1278 | ascent = (face->size->metrics.ascender + 63) >> 6; |
1269 | descent = (-face->size->metrics.descender + 63) >> 6; |
1279 | descent = (-face->size->metrics.descender + 63) >> 6; |
1270 | height = max (ascent + descent, (face->size->metrics.height + 63) >> 6); |
1280 | height = max (ascent + descent, (face->size->metrics.height + 63) >> 6); |
1271 | width = 0; |
1281 | width = 0; |
1272 | |
1282 | |