… | |
… | |
1387 | int wcw = max (WCWIDTH (chr), 1); |
1387 | int wcw = max (WCWIDTH (chr), 1); |
1388 | |
1388 | |
1389 | XGlyphInfo g; |
1389 | XGlyphInfo g; |
1390 | XftTextExtents32 (term->dpy, f, &chr, 1, &g); |
1390 | XftTextExtents32 (term->dpy, f, &chr, 1, &g); |
1391 | |
1391 | |
|
|
1392 | int cwidth = prop->width * wcw; |
|
|
1393 | |
|
|
1394 | // use same adjustments as in ->draw, see there |
|
|
1395 | g.x += g.xOff ? cwidth - g.xOff >> 1 : 0; |
|
|
1396 | g.x += g.xOff ? 0 : cwidth; |
|
|
1397 | |
1392 | int w = g.width - g.x; |
1398 | int w = g.width - g.x; |
1393 | |
1399 | |
1394 | careful = g.x > 0 || w > prop->width * wcw; |
1400 | careful = g.x > 0 || w > cwidth; |
1395 | |
1401 | |
1396 | if (careful && !OVERLAP_OK (w, wcw, prop)) |
1402 | if (careful && !OVERLAP_OK (w, wcw, prop)) |
1397 | return false; |
1403 | return false; |
1398 | |
1404 | |
1399 | // this weeds out _totally_ broken fonts, or glyphs |
1405 | // this weeds out _totally_ broken fonts, or glyphs |