applied Jochen's drw_text patch, thanks
b800a1d1
1 file(s) · +1 −1
| 157 | 157 | ty = y + (h / 2) - (th / 2) + drw->font->ascent; |
|
| 158 | 158 | tx = x + (h / 2); |
|
| 159 | 159 | /* shorten text if necessary */ |
|
| 160 | - | for(len = MIN(olen, sizeof buf); len && tex.w > w - tex.h; len--) |
|
| 160 | + | for(len = MIN(olen, sizeof buf); len && (tex.w > w - tex.h || w < tex.h); len--) |
|
| 161 | 161 | drw_font_getexts(drw->font, text, len, &tex); |
|
| 162 | 162 | if(!len) |
|
| 163 | 163 | return; |